Skip to main content

Crate scalars

Crate scalars 

Source
Expand description

Minimal numeric traits for the vector-space/GA ecosystem.

Traits§

Clamp
Ordering-based minimum, maximum and clamping.
Exp
Exponentiation.
Integer
A totally ordered numeric type with integer division and remainder.
Inv
Multiplicative inverse.
InverseTrigonometry
Inverse trigonometric functions.
Logarithm
Logarithms and arbitrary powers.
Numeric
A type forming a commutative ring: copyable, comparable, with the four basic operations and both identities.
One
Multiplicative identity.
Real
A real-valued numeric type with the full set of algebraic and analytic operations.
Sqrt
Square root.
Trigonometry
Trigonometric functions.
Zero
Additive identity.

Functions§

damp
Frame-rate independent asymptotic approach of current toward target.
damp_factor
Frame-rate independent damping factor in [0, 1).