Expand description
This crate contains new traits useful for working with vector spaces. They have default implementations, so you can just implement them to get a lot of useful methods for free for your vector type. But you can also just implement the methods yourself.
You can also define some library in terms of these traits instead of using a specific vector math implementation, so the user can choose, which one to use, or simply add multiple vector math libraries which implement these traits yourself by using this library.
Traits§
- DotProduct
- This trait defines the dot product.
- Inner
Space - This trait defines the scalar product and adds commom vector operations.
- Outer
Product - This trait defines the outer product.
- Vector
Space - This trait specifies some type to be a vector type. It specifies the scalar type and is required for other vector types.
Functions§
- distance
- The distance between two points.
- distance2
- The squared distance between two points.
- interpolate
- The linear interpolation of two points.