MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Math_ClampAngle

Function Math_ClampAngle

src/ExtMath.c:43–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43float Math_ClampAngle(float degrees) {
44 while (degrees >= 360.0f) degrees -= 360.0f;
45 while (degrees < 0.0f) degrees += 360.0f;
46 return degrees;
47}
48
49float Math_LerpAngle(float leftAngle, float rightAngle, float t) {
50 /* Need to potentially adjust a bit when interpolating some angles */

Callers 5

LocalInterpComp_AngleFunction · 0.85
RotateFenceFunction · 0.85
RotateDirectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected