Struct JAngle
- Namespace
- Jitter2.LinearMath
- Assembly
- Jitter2.dll
A floating point variable of type float representing an angle. This structure exists to eliminate ambiguity between radians and degrees in the Jitter API.
public struct JAngle : IEquatable<JAngle>
- Implements
- Inherited Members
Properties
Degree
Gets or sets the angle value in degrees.
public float Degree { readonly get; set; }
Property Value
Radian
Gets or sets the angle value in radians.
public float Radian { readonly get; set; }
Property Value
Methods
Equals(JAngle)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(JAngle p)
Parameters
pJAngle
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
FromDegree(float)
Creates a JAngle from a value in degrees.
public static JAngle FromDegree(float deg)
Parameters
degfloat
Returns
FromRadian(float)
Creates a JAngle from a value in radians.
public static JAngle FromRadian(float rad)
Parameters
radfloat
Returns
GetHashCode()
Returns the hash code for this instance.
public override readonly int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns a string representation of the JAngle.
public override readonly string ToString()
Returns
Operators
operator +(JAngle, JAngle)
public static JAngle operator +(JAngle a, JAngle b)
Parameters
Returns
operator ==(JAngle, JAngle)
public static bool operator ==(JAngle l, JAngle r)
Parameters
Returns
explicit operator float(JAngle)
public static explicit operator float(JAngle angle)
Parameters
angleJAngle
Returns
explicit operator JAngle(float)
public static explicit operator JAngle(float angle)
Parameters
anglefloat
Returns
operator >(JAngle, JAngle)
public static bool operator >(JAngle l, JAngle r)
Parameters
Returns
operator >=(JAngle, JAngle)
public static bool operator >=(JAngle l, JAngle r)
Parameters
Returns
operator !=(JAngle, JAngle)
public static bool operator !=(JAngle l, JAngle r)
Parameters
Returns
operator <(JAngle, JAngle)
public static bool operator <(JAngle l, JAngle r)
Parameters
Returns
operator <=(JAngle, JAngle)
public static bool operator <=(JAngle l, JAngle r)
Parameters
Returns
operator -(JAngle, JAngle)
public static JAngle operator -(JAngle a, JAngle b)
Parameters
Returns
operator -(JAngle)
public static JAngle operator -(JAngle a)
Parameters
aJAngle