simple-affine-space-0.2: A simple library for affine and vector spaces.
Copyright(c) Antony Courtney and Henrik Nilsson Yale University 2003
LicenseBSD-style (see the LICENSE file in the distribution)
Maintainerivan.perez@keera.co.uk
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Vector3

Description

3D vector abstraction (R^3).

Synopsis

Documentation

data Vector3 a Source #

3D Vector.

Instances

Instances details
Show a => Show (Vector3 a) Source # 
Instance details

Defined in Data.Vector3

Methods

showsPrec :: Int -> Vector3 a -> ShowS #

show :: Vector3 a -> String #

showList :: [Vector3 a] -> ShowS #

NFData a => NFData (Vector3 a) Source # 
Instance details

Defined in Data.Vector3

Methods

rnf :: Vector3 a -> () #

Eq a => Eq (Vector3 a) Source # 
Instance details

Defined in Data.Vector3

Methods

(==) :: Vector3 a -> Vector3 a -> Bool #

(/=) :: Vector3 a -> Vector3 a -> Bool #

RealFloat a => VectorSpace (Vector3 a) a Source # 
Instance details

Defined in Data.Vector3

RealFloat a => AffineSpace (Point3 a) (Vector3 a) a Source # 
Instance details

Defined in Data.Point3

Methods

origin :: Point3 a Source #

(.+^) :: Point3 a -> Vector3 a -> Point3 a Source #

(.-^) :: Point3 a -> Vector3 a -> Point3 a Source #

(.-.) :: Point3 a -> Point3 a -> Vector3 a Source #

distance :: Point3 a -> Point3 a -> a Source #

vector3 :: RealFloat a => a -> a -> a -> Vector3 a Source #

Creates a 3D vector from the cartesian coordinates.

vector3X :: RealFloat a => Vector3 a -> a Source #

X cartesian coordinate.

vector3Y :: RealFloat a => Vector3 a -> a Source #

Y cartesian coordinate.

vector3Z :: RealFloat a => Vector3 a -> a Source #

Z cartesian coordinate.

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.

vector3Rotate :: RealFloat a => a -> a -> Vector3 a -> Vector3 a Source #

Rotates a vector with a given polar and azimuthal angles.