Angle
References[DebuggerDisplay("{ToString()}")]
[IoId("00000000-51B5-482E-A9CD-E356B78383D0")]
public struct Angle : IStorable, IEquatable<Angle>, IComparable<Angle>
A type useful for storing angles. This type is basically a double with some added knowledge about what kind of angle it represents.
Constructors
Properties
Methods
ExtrinsicMean
#Compute the extrinsic mean of a set of angles.
Parameters:
| angles (params Angle[]) | Angles to average. |
Returns: Extrinsic mean, or an invalid angle if there is no average.
FromSeximal
#Create a new angle in seximal degrees.
Parameters:
| angle (double) | Degrees. |
Returns: Angle data.
FromSeximal
#Create a new angle in seximal degrees.
FromSlope
#Create a new angle using a grade percentage.
Parameters:
| grade (double) | Grade percentage. |
Returns: Angle data.
FromSlope
#Create a new angle using slope characteristics.
FromSpread
#Create a new rational trigonometry spread.
Parameters:
| spread (double) | Spread value. |
Returns: Angle data.
FromSpread
#Create a new rational trigonometry spread.
IntrinsicMean
#Compute the extrinsic mean of a set of angles.
Parameters:
| angles (params Angle[]) | Angles to average. |
Returns: Intrinsit mean, or an invalid angle if there is no average.
MatchUnit
#Convert an angle into a different unit. Note that since different units have different gamuts, not all conversions are possible.
MostCommonKind
#Determine the most common angle kind in a list.
Parameters:
| angles (IEnumerable<Angle>) |
MostCommonKind
#Gets the angle kind which best covers all provided angles.
Parameters:
| angles (params Angle[]) |
ReduceToFull
#Reduce this angle to be within the (0, 2pi) or (0, 360) range.
Returns: Reduced angle, may be of different kind than the original.
ReduceToHalf
#Reduce this angle to be within the [-pi,+pi] or [-180,+180] range.
Returns: Reduced angle, may be of different kind than the original.
ToSeximalValues
#Convert an angle in degrees into seximal parts. Note that this method always returns the parts of the absolute value. Correct handling of negative angles is the responsibility of the caller.
ToString
#Format the angle using the appropriate Kind notation.
Returns: String.
Overrides: ValueType.ToString
Operators
| Operation | Result | Description | ||
|---|---|---|---|---|
| Angle | + | Angle | Angle | Add two angles together. |
| Angle | / | double | Angle | Divide an angle by a factor. |
| Angle | / | int | Angle | Divide an angle by a factor. |
| Angle | * | double | Angle | Multiply an angle by a factor. |
| Angle | * | int | Angle | Multiply an angle by a factor. |
| double | * | Angle | Angle | Multiply an angle by a factor. |
| int | * | Angle | Angle | Multiply an angle by a factor. |
| Angle | - | Angle | Angle | Subtract one angle from another. |
| - | Angle | Angle | Negation operator for angle. | |
| + | Angle | Angle | Identity operator for angle. | |