Table of Contents

Struct AngleSingle

Namespace
HelixToolkit.Maths
Assembly
HelixToolkit.Maths.dll

Represents a unit independent angle using a single-precision floating-point internal representation.

public struct AngleSingle : IComparable, IComparable<AngleSingle>, IEquatable<AngleSingle>, IFormattable
Implements
Inherited Members
Extension Methods

Constructors

AngleSingle(float, AngleType)

Initializes a new instance of the SharpDX.AngleSingle structure with the given unit dependant angle and unit type.

public AngleSingle(float angle, AngleType type)

Parameters

angle float

A unit dependant measure of the angle.

type AngleType

The type of unit the angle argument is.

AngleSingle(float, float)

Initializes a new instance of the SharpDX.AngleSingle structure using the arc length formula (θ = s/r).

public AngleSingle(float arcLength, float radius)

Parameters

arcLength float

The measure of the arc.

radius float

The radius of the circle.

Fields

Degree

A value that specifies the size of a single degree.

public const float Degree = 0.0027777778

Field Value

float

Gradian

A value that specifies the size of a single gradian.

public const float Gradian = 0.0025

Field Value

float

Milliradian

A value that specifies the size of a single milliradian.

public const float Milliradian = 0.00015915494

Field Value

float

Minute

A value that specifies the size of a single minute.

public const float Minute = 4.6296296E-05

Field Value

float

Radian

A value that specifies the size of a single radian.

public const float Radian = 0.15915494

Field Value

float

Second

A value that specifies the size of a single second.

public const float Second = 7.7160496E-07

Field Value

float

Properties

Complement

Gets a SharpDX.AngleSingle instance that complements this angle (i.e. the two angles add to 90°).

public readonly AngleSingle Complement { get; }

Property Value

AngleSingle

Degrees

Gets or sets the total number of degrees this SharpDX.AngleSingle represents.

public float Degrees { readonly get; set; }

Property Value

float

FullRotationAngle

Gets a new SharpDX.AngleSingle instance that represents the full rotation angle (i.e. 360° or 2π).

public static AngleSingle FullRotationAngle { get; }

Property Value

AngleSingle

Gradians

Gets or sets the total number of gradians this SharpDX.AngleSingle represents.

public float Gradians { readonly get; set; }

Property Value

float

IsAcute

Gets a System.Boolean that determines whether this SharpDX.Angle is an acute angle (i.e. less than 90° but greater than 0°).

public readonly bool IsAcute { get; }

Property Value

bool

IsFullRotation

Gets a System.Boolean that determines whether this SharpDX.Angle is a full rotation angle (i.e. 360° or 2π).

public readonly bool IsFullRotation { get; }

Property Value

bool

IsOblique

Gets a System.Boolean that determines whether this SharpDX.Angle is an oblique angle (i.e. is not 90° or a multiple of 90°).

public readonly bool IsOblique { get; }

Property Value

bool

IsObtuse

Gets a System.Boolean that determines whether this SharpDX.Angle is an obtuse angle (i.e. greater than 90° but less than 180°).

public readonly bool IsObtuse { get; }

Property Value

bool

IsReflex

Gets a System.Boolean that determines whether this SharpDX.Angle is a reflex angle (i.e. greater than 180° but less than 360°).

public readonly bool IsReflex { get; }

Property Value

bool

IsRight

Gets a System.Boolean that determines whether this SharpDX.Angle is a right angle (i.e. 90° or π/2).

public readonly bool IsRight { get; }

Property Value

bool

IsStraight

Gets a System.Boolean that determines whether this SharpDX.Angle is a straight angle (i.e. 180° or π).

public readonly bool IsStraight { get; }

Property Value

bool

Milliradians

Gets or sets the total number of milliradians this SharpDX.AngleSingle represents. One milliradian is equal to 1/(2000π).

public float Milliradians { readonly get; set; }

Property Value

float

Minutes

Gets or sets the minutes component of the degrees this SharpDX.AngleSingle represents. When setting the minutes, if the value is in the range (-60, 60) the whole degrees are not changed; otherwise, the whole degrees may be changed. Fractional values may set the seconds component.

public float Minutes { readonly get; set; }

Property Value

float

Radians

Gets or sets the total number of radians this SharpDX.AngleSingle represents.

public float Radians { readonly get; set; }

Property Value

float

Revolutions

Gets or sets the total number of revolutions this SharpDX.AngleSingle represents.

public float Revolutions { readonly get; set; }

Property Value

float

RightAngle

Gets a new SharpDX.AngleSingle instance that represents the right angle (i.e. 90° or π/2).

public static AngleSingle RightAngle { get; }

Property Value

AngleSingle

Seconds

Gets or sets the seconds of the degrees this SharpDX.AngleSingle represents. When setting the seconds, if the value is in the range (-60, 60) the whole minutes or whole degrees are not changed; otherwise, the whole minutes or whole degrees may be changed.

public float Seconds { readonly get; set; }

Property Value

float

StraightAngle

Gets a new SharpDX.AngleSingle instance that represents the straight angle (i.e. 180° or π).

public static AngleSingle StraightAngle { get; }

Property Value

AngleSingle

Supplement

Gets a SharpDX.AngleSingle instance that supplements this angle (i.e. the two angles add to 180°).

public readonly AngleSingle Supplement { get; }

Property Value

AngleSingle

ZeroAngle

Gets a new SharpDX.AngleSingle instance that represents the zero angle (i.e. 0°).

public static AngleSingle ZeroAngle { get; }

Property Value

AngleSingle

Methods

Add(AngleSingle, AngleSingle)

Adds two SharpDX.AngleSingle objects and returns the result.

public static AngleSingle Add(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first object to add.

right AngleSingle

The second object to add.

Returns

AngleSingle

The value of the two objects added together.

CompareTo(AngleSingle)

Compares this instance to a second SharpDX.AngleSingle and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified object.

public readonly int CompareTo(AngleSingle other)

Parameters

other AngleSingle

The object to compare.

Returns

int

A signed integer that indicates the relationship of the current instance to the obj parameter. If the value is less than zero, the current instance is less than the other. If the value is zero, the current instance is equal to the other. If the value is greater than zero, the current instance is greater than the other.

CompareTo(object?)

Compares this instance to a specified object and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified object.

public readonly int CompareTo(object? other)

Parameters

other object

The object to compare.

Returns

int

A signed integer that indicates the relationship of the current instance to the obj parameter. If the value is less than zero, the current instance is less than the other. If the value is zero, the current instance is equal to the other. If the value is greater than zero, the current instance is greater than the other.

Divide(AngleSingle, AngleSingle)

Divides two SharpDX.AngleSingle objects and returns the result.

public static AngleSingle Divide(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The numerator object.

right AngleSingle

The denominator object.

Returns

AngleSingle

The value of the two objects divided.

Equals(AngleSingle)

Returns a value that indicates whether the current instance and a specified SharpDX.AngleSingle object have the same value.

public readonly bool Equals(AngleSingle other)

Parameters

other AngleSingle

The object to compare.

Returns

bool

Returns true if this SharpDX.AngleSingle object and another have the same value; otherwise, false.

Equals(object?)

Returns a value that indicates whether the current instance and a specified object have the same value.

public override readonly bool Equals(object? obj)

Parameters

obj object

The object to compare.

Returns

bool

Returns true if the obj parameter is a SharpDX.AngleSingle object or a type capable of implicit conversion to a SharpDX.AngleSingle value, and its value is equal to the value of the current SharpDX.Angle object; otherwise, false.

GetHashCode()

Returns a hash code for this SharpDX.AngleSingle instance.

public override readonly int GetHashCode()

Returns

int

A 32-bit signed integer hash code.

Max(AngleSingle, AngleSingle)

Compares two SharpDX.AngleSingle instances and returns the greater angle.

public static AngleSingle Max(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first SharpDX.AngleSingle instance to compare.

right AngleSingle

The second SharpDX.AngleSingle instance to compare.

Returns

AngleSingle

The greater of the two given SharpDX.AngleSingle instances.

Min(AngleSingle, AngleSingle)

Compares two SharpDX.AngleSingle instances and returns the smaller angle.

public static AngleSingle Min(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first SharpDX.AngleSingle instance to compare.

right AngleSingle

The second SharpDX.AngleSingle instance to compare.

Returns

AngleSingle

The smaller of the two given SharpDX.AngleSingle instances.

Multiply(AngleSingle, AngleSingle)

Multiplies two SharpDX.AngleSingle objects and returns the result.

public static AngleSingle Multiply(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first object to multiply.

right AngleSingle

The second object to multiply.

Returns

AngleSingle

The value of the two objects multiplied together.

Subtract(AngleSingle, AngleSingle)

Subtracts two SharpDX.AngleSingle objects and returns the result.

public static AngleSingle Subtract(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first object to subtract.

right AngleSingle

The second object to subtract.

Returns

AngleSingle

The value of the two objects subtracted.

ToString()

Returns a string that represents this instance.

public override readonly string ToString()

Returns

string

A string that represents this instance.

ToString(IFormatProvider)

Returns a string that represents this instance.

public readonly string ToString(IFormatProvider formatProvider)

Parameters

formatProvider IFormatProvider

The format provider.

Returns

string

A string that represents this instance.

ToString(string)

Returns a string that represents this instance.

public readonly string ToString(string format)

Parameters

format string

The format.

Returns

string

A string that represents this instance.

ToString(string?, IFormatProvider?)

Returns a string that represents this instance.

public readonly string ToString(string? format, IFormatProvider? formatProvider)

Parameters

format string

The format.

formatProvider IFormatProvider

The format provider.

Returns

string

A string that represents this instance.

Wrap()

Wraps this SharpDX.AngleSingle to be in the range [π, -π].

public void Wrap()

Wrap(AngleSingle)

Wraps the SharpDX.AngleSingle given in the value argument to be in the range [π, -π].

public static AngleSingle Wrap(AngleSingle value)

Parameters

value AngleSingle

A SharpDX.AngleSingle to wrap.

Returns

AngleSingle

The SharpDX.AngleSingle that is wrapped.

WrapPositive()

Wraps this SharpDX.AngleSingle to be in the range [0, 2π).

public void WrapPositive()

WrapPositive(AngleSingle)

Wraps the SharpDX.AngleSingle given in the value argument to be in the range [0, 2π).

public static AngleSingle WrapPositive(AngleSingle value)

Parameters

value AngleSingle

A SharpDX.AngleSingle to wrap.

Returns

AngleSingle

The SharpDX.AngleSingle that is wrapped.

Operators

operator +(AngleSingle, AngleSingle)

Adds two SharpDX.AngleSingle objects and returns the result.

public static AngleSingle operator +(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first object to add.

right AngleSingle

The second object to add.

Returns

AngleSingle

The value of the two objects added together.

operator /(AngleSingle, AngleSingle)

Divides two SharpDX.AngleSingle objects and returns the result.

public static AngleSingle operator /(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The numerator object.

right AngleSingle

The denominator object.

Returns

AngleSingle

The value of the two objects divided.

operator ==(AngleSingle, AngleSingle)

Returns a System.Boolean that indicates whether the values of two SharpDX.Angle objects are equal.

public static bool operator ==(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first object to compare.

right AngleSingle

The second object to compare.

Returns

bool

True if the left and right parameters have the same value; otherwise, false.

operator >(AngleSingle, AngleSingle)

Returns a System.Boolean that indicates whether a SharpDX.Angle object is greater than another SharpDX.AngleSingle object.

public static bool operator >(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first object to compare.

right AngleSingle

The second object to compare.

Returns

bool

True if left is greater than right; otherwise, false.

operator >=(AngleSingle, AngleSingle)

Returns a System.Boolean that indicates whether a SharpDX.Angle object is greater than or equal to another SharpDX.AngleSingle object.

public static bool operator >=(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first object to compare.

right AngleSingle

The second object to compare.

Returns

bool

True if left is greater than or equal to right; otherwise, false.

operator !=(AngleSingle, AngleSingle)

Returns a System.Boolean that indicates whether the values of two SharpDX.Angle objects are not equal.

public static bool operator !=(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first object to compare.

right AngleSingle

The second object to compare.

Returns

bool

True if the left and right parameters do not have the same value; otherwise, false.

operator <(AngleSingle, AngleSingle)

Returns a System.Boolean that indicates whether a SharpDX.Angle object is less than another SharpDX.AngleSingle object.

public static bool operator <(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first object to compare.

right AngleSingle

The second object to compare.

Returns

bool

True if left is less than right; otherwise, false.

operator <=(AngleSingle, AngleSingle)

Returns a System.Boolean that indicates whether a SharpDX.Angle object is less than or equal to another SharpDX.AngleSingle object.

public static bool operator <=(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first object to compare.

right AngleSingle

The second object to compare.

Returns

bool

True if left is less than or equal to right; otherwise, false.

operator *(AngleSingle, AngleSingle)

Multiplies two SharpDX.AngleSingle objects and returns the result.

public static AngleSingle operator *(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first object to multiply.

right AngleSingle

The second object to multiply.

Returns

AngleSingle

The value of the two objects multiplied together.

operator -(AngleSingle, AngleSingle)

Subtracts two SharpDX.AngleSingle objects and returns the result.

public static AngleSingle operator -(AngleSingle left, AngleSingle right)

Parameters

left AngleSingle

The first object to subtract

right AngleSingle

The second object to subtract.

Returns

AngleSingle

The value of the two objects subtracted.

operator -(AngleSingle)

Returns the the negated value of the SharpDX.AngleSingle operand.

public static AngleSingle operator -(AngleSingle value)

Parameters

value AngleSingle

A SharpDX.AngleSingle object.

Returns

AngleSingle

The negated value of the value parameter.

operator +(AngleSingle)

Returns the value of the SharpDX.AngleSingle operand. (The sign of the operand is unchanged.)

public static AngleSingle operator +(AngleSingle value)

Parameters

value AngleSingle

A SharpDX.AngleSingle object.

Returns

AngleSingle

The value of the value parameter.