vect-floating-0.1.0.3: A low-dimensional linear algebra library, operating on the Floating typeclass

Data.Vect.Floating.Util.Dim2

Synopsis

# Documentation

structVec2 :: [a] -> [Vec2 a]Source

Example: `structVec2 [1,2,3,4] = [ Vec2 1 2 , Vec2 3 4 ]`.

destructVec2 :: [Vec2 a] -> [a]Source

The opposite of structVec2.

det2 :: Floating a => Vec2 a -> Vec2 a -> aSource

vec2X :: Num a => Vec2 aSource

vec2Y :: Num a => Vec2 aSource

translate2X :: Num a => a -> Vec2 a -> Vec2 aSource

translate2Y :: Num a => a -> Vec2 a -> Vec2 aSource

sinCos :: Floating a => a -> Vec2 aSource

unit vector with given angle relative to the positive X axis (in the positive direction, that is, CCW). A more precise name would be `cosSin`, but that sounds bad :)

Arguments

 :: Floating a => a angle (in radians) -> a radius -> Vec2 a

angle2 :: RealFloat a => Vec2 a -> aSource

The angle relative to the positive X axis

rotMatrix2 :: Floating a => a -> Mat2 aSource

Rotation matrix by a given angle (in radians), counterclockwise.

rotate2 :: Floating a => a -> Vec2 a -> Vec2 aSource

rotateCCW :: Floating a => Vec2 a -> Vec2 aSource

Rotates counterclockwise by 90 degrees.

rotateCW :: Floating a => Vec2 a -> Vec2 aSource

Rotates clockwise by 90 degrees.