Safe Haskell | None |
---|
- data Vector3 = Vector3 {}
- unpackVector3 :: Vector3 -> (Double, Double, Double)
- vnormalise :: Vector3 -> Vector3
- vdot :: Vector3 -> Vector3 -> Double
- (*|) :: Double -> Vector3 -> Vector3
- (|*) :: Vector3 -> Double -> Vector3
- vzip :: (Double -> Double -> Double) -> Vector3 -> Vector3 -> Vector3
- vmap :: (Double -> Double) -> Vector3 -> Vector3
- vnorm :: Vector3 -> Double
- vproj :: Vector3 -> Vector3 -> Vector3
- vperpend :: Vector3 -> Vector3 -> Vector3
- vperpends :: Vector3 -> [Vector3] -> Vector3
- vdihedral :: Vector3 -> Vector3 -> Vector3 -> Double
Documentation
data Vector3
unpackVector3 :: Vector3 -> (Double, Double, Double)Source
This module wraps 3D vector operations, and adds missing ones.
Unpacks an abstract 3D vector into a triple of Doubles.
vnormalise :: Vector3 -> Vector3Source
Normalises to a unit vector in the same direction as input.
(*|) :: Double -> Vector3 -> Vector3Source
Scalar product. (*
indicates side on which one can put a scalar.)
(|*) :: Vector3 -> Double -> Vector3Source
Scalar product. (*
indicates side on which one can put a scalar.)
vzip :: (Double -> Double -> Double) -> Vector3 -> Vector3 -> Vector3Source
Maps an operation on a pair of Doubles onto a pair of 3D vectors coordinatewise.
vmap :: (Double -> Double) -> Vector3 -> Vector3Source
Maps an operation that modifies a Double onto a 3D vector.
vproj :: Vector3 -> Vector3 -> Vector3Source
Finds a vector component of the first vector that is a projection onto direction of second vector.
vperpend :: Vector3 -> Vector3 -> Vector3Source
Returns a component of the vector v that is perpendicular to w.