Yampa-0.11: Library for programming hybrid systems.

Copyright (c) Antony Courtney and Henrik Nilsson Yale University 2003 BSD-style (see the LICENSE file in the distribution) nilsson@cs.yale.edu provisional non-portable (GHC extensions) Safe Haskell98

FRP.Yampa.Vector3

Description

3D vector abstraction (R^3).

Synopsis

# Documentation

data Vector3 a Source #

3D Vector.

Instances

 Eq a => Eq (Vector3 a) Source # Methods(==) :: Vector3 a -> Vector3 a -> Bool #(/=) :: Vector3 a -> Vector3 a -> Bool # Show a => Show (Vector3 a) Source # MethodsshowsPrec :: Int -> Vector3 a -> ShowS #show :: Vector3 a -> String #showList :: [Vector3 a] -> ShowS # RealFloat a => Forceable (Vector3 a) Source # Methodsforce :: Vector3 a -> Vector3 a Source # RealFloat a => VectorSpace (Vector3 a) a Source # Methods(*^) :: 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 #dot :: Vector3 a -> Vector3 a -> a Source #norm :: Vector3 a -> a Source # RealFloat a => AffineSpace (Point3 a) (Vector3 a) a Source # Methods(.+^) :: 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 #

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.