Garry's Mod Wiki

math.NormalizeAngle

  number math.NormalizeAngle( number angle )

Description

Normalizes angle, so it returns value between -180 and 180.

Arguments

1 number angle
The angle to normalize, in degrees.

Returns

1 number
The normalized angle, in the range of -180 to 180 degrees.