Module nannou::math

source ·
Expand description

A mathematical foundation for nannou including point and vector types and a range of helper/utility functions.

Modules

Traits

  • Functions for converting between angle representations.
  • Create a transformation matrix that will cause a vector to point at dir using up for orientation.
  • Short-hand for retrieving the angle of the vector in radians.

Functions

  • Clamp a value between some range.
  • Convert the given angle in degrees to the same angle in radians.
  • Models the C++ fmod function.
  • Maps a value from an input range to an output range.
  • The max between two partially ordered values.
  • The min between two partially ordered values.
  • Convert the given angle in radians to the same angle in degrees.
  • Convert the given value in radians to the equivalent value as a number of turns.
  • Convert the given value as a number of “turns” into the equivalent angle in radians.