Table of Contents

Method Normalize360

Namespace
LMKit.Graphics.Geometry
Assembly
LM-Kit.NET.dll

Normalize360(double)

Normalizes an angle in degrees to the canonical range [0, 360).

public static double Normalize360(double deg)

Parameters

deg double

Angle in degrees (any real number).

Returns

double

An equivalent angle in the range [0, 360). Note that 360 maps to 0.

Examples

Angles.Normalize360(-10)   // 350
Angles.Normalize360(390)   // 30
Angles.Normalize360(720)   // 0

Remarks

This method uses modular arithmetic and does not clamp NaN; if deg is NaN, the result is NaN.