Yasiu Math 1
Collection of mathematic functions that help create game mechanics and procedural tools
Loading...
Searching...
No Matches
YasiuMath::AngleUtils Namespace Reference

Functions

template<typename T>
static T NormalizeAngleToPeriod (T angle, T period=360.f)
 Normalize angle by removing full periods from value, result is in range <0, period>.

Detailed Description

Collection of functions working with angles

Function Documentation

◆ NormalizeAngleToPeriod()

template<typename T>
T YasiuMath::AngleUtils::NormalizeAngleToPeriod ( T angle,
T period = 360.f )
static

Normalize angle by removing full periods from value, result is in range <0, period>.

Angle normalization removes any excessive amount of periods from its value.

Warning
Does not support negative periods