Safe Haskell | None |
---|
- structVec2 :: [a] -> [Vec2 a]
- destructVec2 :: [Vec2 a] -> [a]
- det2 :: Floating a => Vec2 a -> Vec2 a -> a
- vec2X :: Num a => Vec2 a
- vec2Y :: Num a => Vec2 a
- translate2X :: Num a => a -> Vec2 a -> Vec2 a
- translate2Y :: Num a => a -> Vec2 a -> Vec2 a
- sinCos :: Floating a => a -> Vec2 a
- sinCos' :: Floating a => a -> Normal2 a
- sinCosRadius :: Floating a => a -> a -> Vec2 a
- angle2 :: RealFloat a => Vec2 a -> a
- angle2' :: RealFloat a => Normal2 a -> a
- rotMatrix2 :: Floating a => a -> Mat2 a
- rotMatrixOrtho2 :: Floating a => a -> Ortho2 a
- rotate2 :: Floating a => a -> Vec2 a -> Vec2 a
- rotateCCW :: Floating a => Vec2 a -> Vec2 a
- rotateCW :: Floating a => Vec2 a -> Vec2 a
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.
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 :)
:: Floating a | |
=> a | angle (in radians) |
-> a | radius |
-> Vec2 a |
rotMatrix2 :: Floating a => a -> Mat2 aSource
Rotation matrix by a given angle (in radians), counterclockwise.
rotMatrixOrtho2 :: Floating a => a -> Ortho2 aSource