Method DegText
DegText(double)
Formats an angle in degrees as an invariant string, appending the degree symbol (°).
public static string DegText(double degrees)
Parameters
degreesdoubleAngle in degrees.
Returns
- string
A string such as
"0°","12.5°", or with up to 17 significant digits for doubles.
Examples
string s = Angles.DegText(12.345); // "12.345°"
Remarks
Uses InvariantCulture and the "G17" format for precise round-tripping of double values.
Returns a cached "0°" when degrees equals 0.
- See Also