Copyright | (c) Antony Courtney and Henrik Nilsson Yale University 2003 |
---|---|
License | BSD-style (see the LICENSE file in the distribution) |
Maintainer | ivan.perez@keera.co.uk |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe |
Language | Haskell98 |
3D vector abstraction (R^3).
Synopsis
- data Vector3 a
- vector3 :: RealFloat a => a -> a -> a -> Vector3 a
- vector3X :: RealFloat a => Vector3 a -> a
- vector3Y :: RealFloat a => Vector3 a -> a
- vector3Z :: RealFloat a => Vector3 a -> a
- vector3XYZ :: RealFloat a => Vector3 a -> (a, a, a)
- vector3Spherical :: RealFloat a => a -> a -> a -> Vector3 a
- vector3Rho :: RealFloat a => Vector3 a -> a
- vector3Theta :: RealFloat a => Vector3 a -> a
- vector3Phi :: RealFloat a => Vector3 a -> a
- vector3RhoThetaPhi :: RealFloat a => Vector3 a -> (a, a, a)
- vector3Rotate :: RealFloat a => a -> a -> Vector3 a -> Vector3 a
Documentation
3D Vector.
Instances
Eq a => Eq (Vector3 a) Source # | |
Show a => Show (Vector3 a) Source # | |
NFData a => NFData (Vector3 a) Source # | |
Defined in Data.Vector3 | |
RealFloat a => VectorSpace (Vector3 a) a Source # | |
Defined in Data.Vector3 zeroVector :: Vector3 a Source # (*^) :: a -> Vector3 a -> Vector3 a Source # (^/) :: Vector3 a -> a -> Vector3 a Source # (^+^) :: Vector3 a -> Vector3 a -> Vector3 a Source # (^-^) :: Vector3 a -> Vector3 a -> Vector3 a Source # negateVector :: Vector3 a -> Vector3 a Source # dot :: Vector3 a -> Vector3 a -> a Source # | |
RealFloat a => AffineSpace (Point3 a) (Vector3 a) a Source # | |
vector3 :: RealFloat a => a -> a -> a -> Vector3 a Source #
Creates a 3D vector from the cartesian coordinates.
vector3XYZ :: RealFloat a => Vector3 a -> (a, a, a) Source #
Returns a vector's cartesian coordinates.
vector3Spherical :: RealFloat a => a -> a -> a -> Vector3 a Source #
Creates a 3D vector from the spherical coordinates.
vector3Rho :: RealFloat a => Vector3 a -> a Source #
Calculates the vector's radial distance.
vector3Theta :: RealFloat a => Vector3 a -> a Source #
Calculates the vector's azimuth.
vector3Phi :: RealFloat a => Vector3 a -> a Source #
Calculates the vector's inclination.
vector3RhoThetaPhi :: RealFloat a => Vector3 a -> (a, a, a) Source #
Spherical coordinate representation of a 3D vector.