Animas-0.2: Updated version of Yampa: a library for programming hybrid systems.

Portability non-portable (GHC extensions) provisional nilsson@cs.yale.edu

FRP.Animas.Vector3

Description

3D vector abstraction (R^3).

ToDo: Deriving Show, or provide dedicated show instance?

Synopsis

# Documentation

data RealFloat a => Vector3 a Source

3-dimensional vector

Instances

 RealFloat a => Eq (Vector3 a) RealFloat a => Show (Vector3 a) RealFloat a => Forceable (Vector3 a) RealFloat a => VectorSpace (Vector3 a) a RealFloat a => AffineSpace (Point3 a) (Vector3 a) a

Arguments

 :: RealFloat a => a X magnitude -> a Y magnitude -> a Z magnitude -> Vector3 a Vector

Construct a 3 dimensional vector

vector3X :: RealFloat a => Vector3 a -> aSource

X magnitude of the vector

vector3Y :: RealFloat a => Vector3 a -> aSource

Y magnitude of the vector

vector3Z :: RealFloat a => Vector3 a -> aSource

Z magnitude of the vector

Arguments

 :: RealFloat a => Vector3 a -> (a, a, a) (X, Y, Z)

Ordered pair of magnitudes of the vector

Arguments

 :: RealFloat a => a magnitude -> a Theta-direction -> a Phi-direction -> Vector3 a

Spherical coordinates to vector

vector3Rho :: RealFloat a => Vector3 a -> aSource

Magnitude of a vector

vector3Theta :: RealFloat a => Vector3 a -> aSource

Theta-direction of a vector

vector3Phi :: RealFloat a => Vector3 a -> aSource

Phi-direction of a vector

Arguments

 :: RealFloat a => Vector3 a -> (a, a, a) (Rho, Theta, Phi)

Magnitude and directions of a vector as an ordered triple

Arguments

 :: RealFloat a => a Difference of theta -> a Difference of phi -> Vector3 a Initial vector -> Vector3 a Rotated vector

Rotate a vector