Safe Haskell | None |
---|---|

Language | Haskell98 |

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 where Source

interpolate :: a -> v -> v -> v Source

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 a Source

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