vect-floating-0.1.0.0: A low-dimensional linear algebra library, operating on the Floating typeclass

Safe HaskellNone

Data.Vect.Floating.Interpolate

Description

Interpolation of vectors. Note: we interpolate unit vectors differently from ordinary vectors.

Synopsis

Documentation

class Interpolate a v whereSource

Methods

interpolate :: a -> v -> v -> vSource

Instances

Num a => Interpolate a a 
Floating a => Interpolate a (Normal4 a) 
Floating a => Interpolate a (Normal3 a) 
Floating a => Interpolate a (Normal2 a) 
Floating a => Interpolate a (Vec4 a) 
Floating a => Interpolate a (Vec3 a) 
Floating a => Interpolate a (Vec2 a) 
Floating a => Interpolate a (Quaternion a) 

slerp :: UnitVector a v u => a -> u a -> u a -> u aSource

Spherical linear interpolation. See http://en.wikipedia.org/wiki/Slerp