Diff of /inst/geom2d/rotateVector.m [347d75] .. [fc6c4c] Maximize Restore

  Switch to side-by-side view

--- a/inst/geom2d/rotateVector.m
+++ b/inst/geom2d/rotateVector.m
@@ -22,35 +22,35 @@
 ## CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 ## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {@var{vr} = } rotateVector (@var{v}, @var{theta})
-## Rotate a vector by a given angle
-##
-##  Rotate the vector @var{v} by an angle @var{theta}, given in radians.
-##
-##   Example
-##
-## @example
-##   rotateVector([1 0], pi/2)
-##   ans = 
-##       0   1
-## @end example
-##
-## @seealso{vectors2d, transformVector, createRotation}
-## @end deftypefn
-
-function vr = rotateVector(v, angle)
-
-  # precomputes angles
-  cot = cos(angle);
-  sit = sin(angle);
-
-  # compute rotated coordinates
-  vr = [cot * v(:,1) - sit * v(:,2) , sit * v(:,1) + cot * v(:,2)];
-  
-endfunction
-
-%!assert ([0 1],rotateVector([1 0],pi/2), 1e-6)
-%!assert (sqrt([0.5 0.5]),rotateVector([1 0],pi/4), 1e-6)
-
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{vr} = } rotateVector (@var{v}, @var{theta})
+## Rotate a vector by a given angle
+##
+##  Rotate the vector @var{v} by an angle @var{theta}, given in radians.
+##
+##   Example
+##
+## @example
+##   rotateVector([1 0], pi/2)
+##   ans = 
+##       0   1
+## @end example
+##
+## @seealso{vectors2d, transformVector, createRotation}
+## @end deftypefn
+
+function vr = rotateVector(v, angle)
+
+  # precomputes angles
+  cot = cos(angle);
+  sit = sin(angle);
+
+  # compute rotated coordinates
+  vr = [cot * v(:,1) - sit * v(:,2) , sit * v(:,1) + cot * v(:,2)];
+  
+endfunction
+
+%!assert ([0 1],rotateVector([1 0],pi/2), 1e-6)
+%!assert (sqrt([0.5 0.5]),rotateVector([1 0],pi/4), 1e-6)
+