Module nannou::math[][src]

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

ConvertAngle

Functions for converting between angle representations.

Mat4LookTo

Create a transformation matrix that will cause a vector to point at dir using up for orientation.

Vec2Angle

Short-hand for retrieving the angle of the vector in radians.

Vec2Rotate

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