Copyright | (c) Conal Elliott 2008 |
---|---|

License | BSD3 |

Maintainer | conal@conal.net |

Stability | experimental |

Safe Haskell | None |

Language | Haskell98 |

Cross products and normals

# Documentation

class HasNormal v where Source #

Thing with a normal vector (not necessarily normalized).

## Instances

(VectorSpace s, HasBasis s, HasTrie (Basis s), HasNormal (Two s :> Three s)) => HasNormal (Three (Two s :> s)) Source # | |

(VectorSpace s, HasBasis s, HasTrie (Basis s), Basis s ~ ()) => HasNormal (Two (One s :> s)) Source # | |

(Num s, HasTrie (Basis (s, s)), HasBasis s, Basis s ~ ()) => HasNormal (Two s :> Three s) Source # | |

(HasBasis s, HasTrie (Basis s), Basis s ~ ()) => HasNormal (One s :> Two s) Source # | |

normal :: (HasNormal v, InnerSpace v, Floating (Scalar v)) => v -> v Source #

Normalized normal vector. See also `cross`

.