Stability | experimental |
---|---|
Maintainer | conal@conal.net, andygill@ku.edu |
Affine spaces.
- class VectorSpace v s => AffineSpace p v s | p -> v s where
- (.-^) :: (Num s, AffineSpace p v s) => p -> v -> p
- distanceSq :: (AffineSpace p v s, InnerSpace v s) => p -> p -> s
- distance :: (Floating s, AffineSpace p v s, InnerSpace v s) => p -> p -> s
- alerp :: AffineSpace p v s => p -> p -> s -> p
Documentation
class VectorSpace v s => AffineSpace p v s | p -> v s whereSource
(.-^) :: (Num s, AffineSpace p v s) => p -> v -> pSource
Point minus vector
distanceSq :: (AffineSpace p v s, InnerSpace v s) => p -> p -> sSource
Square of the distance between two points. Sometimes useful for
efficiency. See also distance
.
distance :: (Floating s, AffineSpace p v s, InnerSpace v s) => p -> p -> sSource
Distance between two points. See also distanceSq
.
alerp :: AffineSpace p v s => p -> p -> s -> pSource
Affine linear interpolation. Varies from p
to p'
as s
varies
from 0 to 1. See also lerp
(on vector spaces).