Angle Structure

Represents an angle, in radians, as a double-precision floating-point number.

Definition

Namespace: Gemstone.Units
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
[SerializableAttribute]
public struct Angle : IComparable, IFormattable, 
	IConvertible, IComparable<Angle>, IComparable<double>, IEquatable<Angle>, 
	IEquatable<double>
Inheritance
Object    ValueType    Angle
Implements
IComparable, IComparableAngle, IComparableDouble, IConvertible, IEquatableAngle, IEquatableDouble, IFormattable

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();
}

Constructors

Angle Creates a new Angle.

Methods

CompareTo(Angle) Compares this instance to a specified Angle and returns an indication of their relative values.
CompareTo(Double) Compares this instance to a specified Double and returns an indication of their relative values.
CompareTo(Object) Compares this instance to a specified object and returns an indication of their relative values.
ConvertFrom Converts the value in the specified sourceUnit to a new Angle in radians.
ConvertTo Converts the Angle to the specified targetUnit.
Equals(Angle) Returns a value indicating whether this instance is equal to a specified Angle value.
Equals(Double) Returns a value indicating whether this instance is equal to a specified Double value.
Equals(Object) Returns a value indicating whether this instance is equal to a specified object.
(Overrides ValueTypeEquals(Object))
FromAngularMil Creates a new Angle value from the specified value in angular mil.
FromArcMinutes Creates a new Angle value from the specified value in arcminutes.
FromArcSeconds Creates a new Angle value from the specified value in arcseconds.
FromDegrees Creates a new Angle value from the specified value in degrees.
FromGrads Creates a new Angle value from the specified value in grads.
GetHashCode Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetTypeCode Returns the TypeCode for value type Double.
Parse(String) Converts the string representation of a number to its Angle equivalent.
Parse(String, NumberStyles) Converts the string representation of a number in a specified style to its Angle equivalent.
Parse(String, IFormatProvider) Converts the string representation of a number in a specified culture-specific format to its Angle equivalent.
Parse(String, NumberStyles, IFormatProvider) Converts the string representation of a number in a specified style and culture-specific format to its Angle equivalent.
ToAngularMil Gets the Angle value in angular mil.
ToArcMinutes Gets the Angle value in arcminutes.
ToArcSeconds Gets the Angle value in arcseconds.
ToDegrees Gets the Angle value in degrees.
ToGrads Gets the Angle value in grads.
ToString Converts the numeric value of this instance to its equivalent string representation.
(Overrides ValueTypeToString)
ToString(IFormatProvider) Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
ToString(String) Converts the numeric value of this instance to its equivalent string representation, using the specified format.
ToString(String, IFormatProvider) Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.
TryParse(String, Angle) Converts the string representation of a number to its Angle equivalent. A return value indicates whether the conversion succeeded or failed.
TryParse(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.

Operators

Addition(Angle, Angle) Returns computed sum of values.
Division(Angle, Angle) Returns computed division of values.
Equality(Angle, Angle) Compares the two values for equality.
Exponent(Angle, Angle) Returns result of first value raised to power of second value.
GreaterThan(Angle, Angle) Returns true if left value is greater than right value.
GreaterThanOrEqual(Angle, Angle) Returns true if left value is greater than or equal to right value.
(Angle to Double) Implicitly converts Angle, represented in radians, to a Double.
(Double to Angle) Implicitly converts value, represented in radians, to an Angle.
Inequality(Angle, Angle) Compares the two values for inequality.
LessThan(Angle, Angle) Returns true if left value is less than right value.
LessThanOrEqual(Angle, Angle) Returns true if left value is less or equal to than right value.
Modulus(Angle, Angle) Returns computed remainder after dividing first value by the second.
Multiply(Angle, Angle) Returns computed product of values.
Subtraction(Angle, Angle) Returns computed difference of values.

Fields

MaxValueRepresents the largest possible value of an Angle. This field is constant.
MinValueRepresents the smallest possible value of an Angle. This field is constant.

Extension Methods

GetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
GetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)

See Also