Click or drag to resize

Angle Structure

Represents an angle, in radians, as a double-precision floating-point number.
Inheritance Hierarchy
SystemObject
  SystemValueType
    GSF.UnitsAngle

Namespace: GSF.Units
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax
View Source

The Angle type exposes the following members.

Constructors
 NameDescription
Public methodAngle Creates a new Angle.
Top
Methods
 NameDescription
Public methodStatic memberAverage Calculates an average of the specified sequence of Angle values.
Public methodCompareTo(Angle) Compares this instance to a specified Angle and returns an indication of their relative values.
Public methodCompareTo(Double) Compares this instance to a specified Double and returns an indication of their relative values.
Public methodCompareTo(Object) Compares this instance to a specified object and returns an indication of their relative values.
Public methodStatic memberConvertFrom Converts the value in the specified sourceUnit to a new Angle in radians.
Public methodConvertTo Converts the Angle to the specified targetUnit.
Public methodEquals(Angle) Returns a value indicating whether this instance is equal to a specified Angle value.
Public methodEquals(Double) Returns a value indicating whether this instance is equal to a specified Double value.
Public methodEquals(Object) Returns a value indicating whether this instance is equal to a specified object.
(Overrides ValueTypeEquals(Object))
Public methodStatic memberFromAngularMil Creates a new Angle value from the specified value in angular mil.
Public methodStatic memberFromArcMinutes Creates a new Angle value from the specified value in arcminutes.
Public methodStatic memberFromArcSeconds Creates a new Angle value from the specified value in arcseconds.
Public methodStatic memberFromDegrees Creates a new Angle value from the specified value in degrees.
Public methodStatic memberFromGrads Creates a new Angle value from the specified value in grads.
Public methodGetHashCode Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetTypeCode Returns the TypeCode for value type Double.
Public methodStatic memberParse(String) Converts the string representation of a number to its Angle equivalent.
Public methodStatic memberParse(String, NumberStyles) Converts the string representation of a number in a specified style to its Angle equivalent.
Public methodStatic memberParse(String, IFormatProvider) Converts the string representation of a number in a specified culture-specific format to its Angle equivalent.
Public methodStatic memberParse(String, NumberStyles, IFormatProvider) Converts the string representation of a number in a specified style and culture-specific format to its Angle equivalent.
Public methodToAngularMil Gets the Angle value in angular mil.
Public methodToArcMinutes Gets the Angle value in arcminutes.
Public methodToArcSeconds Gets the Angle value in arcseconds.
Public methodToDegrees Gets the Angle value in degrees.
Public methodToGrads Gets the Angle value in grads.
Public methodToRange Gets the equivalent angle moved within the range of minValue and minValue + 2.0 * PI.
Public methodToString Converts the numeric value of this instance to its equivalent string representation.
(Overrides ValueTypeToString)
Public methodToString(IFormatProvider) Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
Public methodToString(String) Converts the numeric value of this instance to its equivalent string representation, using the specified format.
Public methodToString(String, IFormatProvider) Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.
Public methodStatic memberTryParse(String, Angle) Converts the string representation of a number to its Angle equivalent. A return value indicates whether the conversion succeeded or failed.
Public methodStatic memberTryParse(String, NumberStyles, IFormatProvider, Angle) Converts the string representation of a number in a specified style and culture-specific format to its Angle equivalent. A return value indicates whether the conversion succeeded or failed.
Public methodStatic memberUnwrap Unwraps a set of Angle values so a comparable mathematical operation can be applied.
Top
Operators
 NameDescription
Public operatorStatic memberAddition(Angle, Angle) Returns computed sum of values.
Public operatorStatic memberDivision(Angle, Angle) Returns computed division of values.
Public operatorStatic memberEquality(Angle, Angle) Compares the two values for equality.
Public operatorStatic memberExponent(Angle, Angle) Returns result of first value raised to power of second value.
Public operatorStatic memberGreaterThan(Angle, Angle) Returns true if left value is greater than right value.
Public operatorStatic memberGreaterThanOrEqual(Angle, Angle) Returns true if left value is greater than or equal to right value.
Public operatorStatic member(Angle to Double) Implicitly converts Angle, represented in radians, to a Double.
Public operatorStatic member(Double to Angle) Implicitly converts value, represented in radians, to an Angle.
Public operatorStatic memberInequality(Angle, Angle) Compares the two values for inequality.
Public operatorStatic memberLessThan(Angle, Angle) Returns true if left value is less than right value.
Public operatorStatic memberLessThanOrEqual(Angle, Angle) Returns true if left value is less or equal to than right value.
Public operatorStatic memberModulus(Angle, Angle) Returns computed remainder after dividing first value by the second.
Public operatorStatic memberMultiply(Angle, Angle) Returns computed product of values.
Public operatorStatic memberSubtraction(Angle, Angle) Returns computed difference of values.
Top
Fields
 NameDescription
Public fieldStatic memberMaxValueRepresents the largest possible value of an Angle. This field is constant.
Public fieldStatic memberMinValueRepresents the smallest possible value of an Angle. This field is constant.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks
This class behaves just like a Double representing an angle in radians; it is implicitly castable to and from a Double and therefore can be generally used "as" a double, but it has the advantage of handling conversions to and from other angle representations, specifically degrees, grads (a.k.a., grade, gradian and gon), arcminutes (a.k.a., minute of arc or MOA), arcseconds (a.k.a., second of arc) and angular mil (a.k.a., mil).
Example
This example converts degrees to grads:
C#
public double GetGrads(double degrees)
{
    return Angle.FromDegrees(degrees).ToGrads();
}
See Also