Show / Hide Table of Contents

Struct Angle

Handling of an angle type, Degrees and Radians supported

Implements
IEquatable<Angle>
Namespace: FpAssistantCore.General
Assembly: FpAssistantCoreScl.dll
Syntax
public struct Angle

Constructors

View Source

Angle(Double)

Initialise angle with a degree value

Declaration
public Angle(double degrees)
Parameters
Type Name Description
System.Double degrees

Value of angle in degrees

Remarks

Degree value will be normalised

Examples
Angle myAngleVar = new Angle(90);
View Source

Angle(Double, AngleUnits)

Initialise angle with a degree or radian value

Declaration
public Angle(double angleValue, AngleUnits angleUnit)
Parameters
Type Name Description
System.Double angleValue

Value of angle

AngleUnits angleUnit

Enum defining the unit of the value

View Source

Angle(Int32, Int32, Double)

Initialise angle with degrees. minutes and seconds

Declaration
public Angle(int degrees, int minutes, double seconds)
Parameters
Type Name Description
System.Int32 degrees

Value of degrees

System.Int32 minutes

Value of minutes

System.Double seconds

Value of seconds

Remarks

Degree value will be normalised

Properties

View Source

TotalSeconds

Gets the value of the current Angle structure expressed in whole and fractional seconds

Declaration
public readonly double TotalSeconds { get; }
Property Value
Type Description
System.Double

Total number of seconds

Methods

View Source

AsCompassBearing()

Angle represented as a bearing on a compass

Declaration
public CompassBearing AsCompassBearing()
Returns
Type Description
CompassBearing

Compass bearing value

View Source

AsDegrees()

Angle represented as Degrees

Declaration
public double AsDegrees()
Returns
Type Description
System.Double

Degrees value

View Source

AsRadians()

Angle represented as Radians

Declaration
public double AsRadians()
Returns
Type Description
System.Double

Radians value

View Source

CartesianToCompassDegrees(Double)

Convert cartesian angle to compass bearing - Degrees

Declaration
public static double CartesianToCompassDegrees(double angleDegrees)
Parameters
Type Name Description
System.Double angleDegrees

Value of angle in degrees

Returns
Type Description
System.Double
View Source

CartesianToCompassRadians(Double)

Convert cartesian angle to compass bearing - Radians

Declaration
public static double CartesianToCompassRadians(double angleRadians)
Parameters
Type Name Description
System.Double angleRadians

Value of angle in radians

Returns
Type Description
System.Double
View Source

CompassToCartesianDegrees(Double)

Convert compass bearing to cartesian angle - Degrees

Declaration
public static double CompassToCartesianDegrees(double angleDegrees)
Parameters
Type Name Description
System.Double angleDegrees

Value of angle in degrees

Returns
Type Description
System.Double
View Source

CompassToCartesianRadians(Double)

Convert compass bearing to cartesian angle - Radians

Declaration
public static double CompassToCartesianRadians(double angleRadians)
Parameters
Type Name Description
System.Double angleRadians

Value of angle in radians

Returns
Type Description
System.Double
View Source

DegreesToRadians(Double)

Function to return radians from a degrees value

Declaration
public static double DegreesToRadians(double degrees)
Parameters
Type Name Description
System.Double degrees

Value of degrees to be converted to radians

Returns
Type Description
System.Double

Radians value

Remarks

Static Function

View Source

Equals(Angle)

Declaration
public bool Equals(Angle other)
Parameters
Type Name Description
Angle other
Returns
Type Description
System.Boolean
View Source

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
View Source

FromDegrees(Double)

Function to return an Angle type from a degrees value

Declaration
public static Angle FromDegrees(double degrees)
Parameters
Type Name Description
System.Double degrees

Value of degrees to be normalized

Returns
Type Description
Angle

Degrees value in Angle type

Remarks

Static Function

View Source

FromRadians(Double)

Function to return an Angle type from a radians value

Declaration
public static Angle FromRadians(double radians)
Parameters
Type Name Description
System.Double radians

Value of radians

Returns
Type Description
Angle

Degrees value in Angle type

Remarks

Static Function

View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
View Source

Normalize(Double)

Normalize degree value to ensure valid range

Declaration
public static double Normalize(double degrees)
Parameters
Type Name Description
System.Double degrees

Value of degrees to be normalized

Returns
Type Description
System.Double

Normalized degrees value

Remarks

Static Function

View Source

RadiansToDegrees(Double)

Function to return degrees from a radians value

Declaration
public static double RadiansToDegrees(double radians)
Parameters
Type Name Description
System.Double radians

Value of radians to be converted to degrees

Returns
Type Description
System.Double

Degrees value

Remarks

Static Function

Operators

View Source

Equality(Angle, Angle)

Declaration
public static bool operator ==(Angle a1, Angle a2)
Parameters
Type Name Description
Angle a1
Angle a2
Returns
Type Description
System.Boolean
View Source

Implicit(Angle to Double)

Declaration
public static implicit operator double (Angle angle)
Parameters
Type Name Description
Angle angle
Returns
Type Description
System.Double
View Source

Implicit(Double to Angle)

Declaration
public static implicit operator Angle(double degrees)
Parameters
Type Name Description
System.Double degrees
Returns
Type Description
Angle
View Source

Inequality(Angle, Angle)

Declaration
public static bool operator !=(Angle a1, Angle a2)
Parameters
Type Name Description
Angle a1
Angle a2
Returns
Type Description
System.Boolean

Implements

IEquatable<>
  • View Source
In This Article
Back to top Copyright 2018-2024 CADology Limited