Safe Haskell | None |
---|

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

- class Interpolate a v where
- interpolate :: a -> v -> v -> v

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

# Documentation

class Interpolate a v whereSource

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

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