Humanizer.HeadingExtensions
HeadingExtensions Class
Contains extensions to transform a number indicating a heading into the textual representation of the heading.
public static class HeadingExtensions
Inheritance System.Object → HeadingExtensions
Methods
HeadingExtensions.FromAbbreviatedHeading(this string) Method
Returns a heading based on the short textual representation of the heading.
public static double FromAbbreviatedHeading(this string heading);
Parameters
heading System.String
Returns
System.Double
The heading. -1 if the heading could not be parsed.
HeadingExtensions.ToHeading(this double, HeadingStyle, CultureInfo) Method
Returns a textual representation of the heading.
This representation has a maximum deviation of 11.25 degrees.
public static string ToHeading(this double heading, Humanizer.HeadingStyle style=Humanizer.HeadingStyle.Abbreviated, System.Globalization.CultureInfo culture=null);
Parameters
heading System.Double
The heading value
style HeadingStyle
Whether to return a short result or not. HeadingStyle
culture System.Globalization.CultureInfo
The culture to return the textual representation in
Returns
System.String
A textual representation of the heading
HeadingExtensions.ToHeadingArrow(this double) Method
Returns a char arrow indicating the heading.
This representation has a maximum deviation of 22.5 degrees.
public static char ToHeadingArrow(this double heading);
Parameters
heading System.Double
Returns
System.Char
The heading arrow.