Expand description
A mathematical foundation for nannou including point and vector types and a range of helper/utility functions.
Modules§
- num_
traits - Numeric traits for generic mathematics
Traits§
- Convert
Angle - Functions for converting between angle representations.
- Mat4
Look To - Create a transformation matrix that will cause a vector to point at
dirusingupfor orientation. - Vec2
Angle - Short-hand for retrieving the angle of the vector in radians.
- Vec2
Rotate
Functions§
- clamp
- Clamp a value between some range.
- deg_
to_ rad - Convert the given angle in degrees to the same angle in radians.
- fmod
- Models the C++ fmod function.
- map_
range - Maps a value from an input range to an output range.
- partial_
max - The max between two partially ordered values.
- partial_
min - The min between two partially ordered values.
- rad_
to_ deg - Convert the given angle in radians to the same angle in degrees.
- rad_
to_ turns - Convert the given value in radians to the equivalent value as a number of turns.
- turns_
to_ rad - Convert the given value as a number of “turns” into the equivalent angle in radians.
- two