clampAngle180

Restricts an angle to the range -180, +180 degrees, clamping angles outside the range. Angles less than -180 are returned as -180, and angles greater than +180 are returned as +180. Angles within the range are returned unmodified.

Return

the specified angle clamped to the range -180, +180 degrees

Parameters

degrees

the angle to clamp in degrees