Class AngleUnit
- Namespace
- xFunc.Maths.Expressions.Units.AngleUnits
- Assembly
- xFunc.Maths.dll
Specifies a measurement of angle.
public class AngleUnit : IEquatable<AngleUnit>
- Inheritance
-
AngleUnit
- Implements
- Inherited Members
Fields
Degree
The degree (deg, degree, degrees) unit.
public static readonly AngleUnit Degree
Field Value
Gradian
The gradian (grad, gradian, gradians) unit.
public static readonly AngleUnit Gradian
Field Value
Radian
The radian (rad, radian, radians) unit.
public static readonly AngleUnit Radian
Field Value
Properties
Factor
Gets a factor of conversion from this unit to base unit.
public double Factor { get; }
Property Value
IsDegree
Gets a value indicating whether the current instance is Degree
.
public bool IsDegree { get; }
Property Value
IsGradian
Gets a value indicating whether the current instance is Gradian
.
public bool IsGradian { get; }
Property Value
IsRadian
Gets a value indicating whether the current instance is Radian
.
public bool IsRadian { get; }
Property Value
Names
Gets all available unit names.
public static IEnumerable<string> Names { get; }
Property Value
UnitNames
Gets a short name of the unit.
public IReadOnlyCollection<string> UnitNames { get; }
Property Value
Units
Gets all available units.
public static IEnumerable<AngleUnit> Units { get; }
Property Value
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
Equals(AngleUnit?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(AngleUnit? other)
Parameters
other
AngleUnitAn object to compare with this object.
Returns
FromName(string, out AngleUnit?)
Gets a unit by name.
public static bool FromName(string name, out AngleUnit? unit)
Parameters
name
stringThe name of unit.
unit
AngleUnitWhen this method returns, the value associated with the specified name, if the unit is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
Returns
- bool
true
if area units contain an unit with the specifiedname
; otherwise,false
.
Exceptions
- ArgumentNullException
name
isnull
.
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
operator ==(AngleUnit, AngleUnit)
Determines whether two specified instances of AreaValue are equal.
public static bool operator ==(AngleUnit left, AngleUnit right)
Parameters
Returns
- bool
true
ifleft
is equal toright
; otherwise,false
.
operator !=(AngleUnit, AngleUnit)
Determines whether two specified instances of AreaValue are equal.
public static bool operator !=(AngleUnit left, AngleUnit right)
Parameters
Returns
- bool
true
ifleft
is equal toright
; otherwise,false
.