vect-floating-0.1.0.4: 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 -> a Source

vec2X :: Num a => Vec2 a Source

vec2Y :: Num a => Vec2 a Source

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

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

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

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 -> a Source

The angle relative to the positive X axis

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

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

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

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

Rotates counterclockwise by 90 degrees.

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

Rotates clockwise by 90 degrees.