Method RadText
RadText(double)
Formats an angle in radians as an invariant string, appending the suffix " rad".
public static string RadText(double radians)
Parameters
radiansdoubleAngle in radians.
Returns
- string
A string such as
"0 rad","1.570796326794897 rad", with up to 17 significant digits.
Examples
string s = Angles.RadText(Math.PI / 2); // "1.5707963267948966 rad"
Remarks
Uses InvariantCulture and the "G17" format for precise round-tripping of double values.
Returns a cached "0 rad" when radians equals 0.
- See Also