MathHelper.WrapAngle Method (Microsoft.Xna.Framework)

Reduces a given angle to a value between π and -π.

Namespace: Microsoft.Xna.Framework
Assembly: MonoGame.Framework (MonoGame.Framework.dll
  • C#
  • VB
  • F#
public static float WrapAngle(
	float angle

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.


Type: System.Single
The angle to reduce, in radians.

Return Value

Type: System.Single
The new angle, in radians.
Supported in:

 Windows DirectX Desktop
 Linux Desktop
 Windows OpenGL Desktop