Photon Fusion 2.1.1

Angle Struct Reference

A Networked fusion type for degrees. This can be used with the NetworkedAttribute, in RPCs, or in NetworkInput structs. More...

Inherits INetworkStruct.

Public Member Functions

void Clamp (Angle min, Angle max)
 Clamps the current value to the supplied min-max range.
readonly bool Equals (Angle other)
 Checks equality with another Angle.
override readonly bool Equals (object obj)
 Checks equality with an object.
override readonly int GetHashCode ()
 Gets the hash code.
override readonly string ToString ()
 String representation of the Angle.

Static Public Member Functions

static Angle Clamp (Angle value, Angle min, Angle max)
 Returns a the value, clamped to the min-max range.
static Angle Lerp (Angle a, Angle b, float t)
 Lerps between two angle values.
static Angle Max (Angle a, Angle b)
 Returns the larger of two supplied angles.
static Angle Min (Angle a, Angle b)
 Returns the smaller of two supplied angles.
static implicit operator Angle (double value)
 Converts double to Angle.
static implicit operator Angle (float value)
 Converts float to Angle.
static implicit operator Angle (int value)
 Converts int to Angle.
static operator double (Angle value)
 Converts Angle to double.
static operator float (Angle value)
 Converts Angle to float.
static bool operator!= (Angle a, Angle b)
 Inequality operator for Angle struct.
static Angle operator+ (Angle a, Angle b)
 Addition operator for Angle struct.
static Angle operator- (Angle a, Angle b)
 Subtraction operator for Angle struct.
static bool operator< (Angle a, Angle b)
 Less than operator for Angle struct.
static bool operator<= (Angle a, Angle b)
 Less than or equal to operator for Angle struct.
static bool operator== (Angle a, Angle b)
 Equality operator for Angle struct.
static bool operator> (Angle a, Angle b)
 Greater than operator for Angle struct.
static bool operator>= (Angle a, Angle b)
 Greater than or equal to operator for Angle struct.

Detailed Description

A Networked fusion type for degrees. This can be used with the NetworkedAttribute, in RPCs, or in NetworkInput structs.

Member Function Documentation

◆ Equals() [1/2]

readonly bool Equals ( Angle other)

Checks equality with another Angle.

Parameters
otherOther Angle.
Returns
Equality result.

◆ Equals() [2/2]

override readonly bool Equals ( object obj)

Checks equality with an object.

Parameters
objObject to compare.
Returns
Equality result.

◆ GetHashCode()

override readonly int GetHashCode ( )

Gets the hash code.

Returns
Hash code.

◆ operator Angle() [1/3]

implicit operator Angle ( double value)
static

Converts double to Angle.

Parameters
valueDouble value.
Returns
Angle instance with the value of the double.

◆ operator Angle() [2/3]

implicit operator Angle ( float value)
static

Converts float to Angle.

Parameters
valueFloat value.
Returns
Angle instance with the value of the float.

◆ operator Angle() [3/3]

implicit operator Angle ( int value)
static

Converts int to Angle.

Parameters
valueInteger value.
Returns
Angle instance with the value of the integer.

◆ operator double()

operator double ( Angle value)
explicitstatic

Converts Angle to double.

Parameters
valueAngle instance.
Returns
Double representation of the Angle.

◆ operator float()

operator float ( Angle value)
explicitstatic

Converts Angle to float.

Parameters
valueAngle instance.
Returns
Float representation of the Angle.

◆ operator!=()

bool operator!= ( Angle a,
Angle b )
static

Inequality operator for Angle struct.

Parameters
aFirst Angle instance.
bSecond Angle instance.
Returns
True if the value of the first Angle instance is not equal to the value of the second Angle instance, otherwise false.

◆ operator+()

Angle operator+ ( Angle a,
Angle b )
static

Addition operator for Angle struct.

Parameters
aFirst Angle instance.
bSecond Angle instance.
Returns
A new Angle instance that is the sum of the first and second Angle instances, wrapped around at 360 degrees if necessary.

◆ operator-()

Angle operator- ( Angle a,
Angle b )
static

Subtraction operator for Angle struct.

Parameters
aFirst Angle instance.
bSecond Angle instance.
Returns
A new Angle instance that is the difference of the first and second Angle instances, wrapped around at 360 degrees if necessary.

◆ operator<()

bool operator< ( Angle a,
Angle b )
static

Less than operator for Angle struct.

Parameters
aFirst Angle instance.
bSecond Angle instance.
Returns
True if the value of the first Angle instance is less than the value of the second Angle instance, otherwise false.

◆ operator<=()

bool operator<= ( Angle a,
Angle b )
static

Less than or equal to operator for Angle struct.

Parameters
aFirst Angle instance.
bSecond Angle instance.
Returns
True if the value of the first Angle instance is less than or equal to the value of the second Angle instance, otherwise false.

◆ operator==()

bool operator== ( Angle a,
Angle b )
static

Equality operator for Angle struct.

Parameters
aFirst Angle instance.
bSecond Angle instance.
Returns
True if the value of the first Angle instance is equal to the value of the second Angle instance, otherwise false.

◆ operator>()

bool operator> ( Angle a,
Angle b )
static

Greater than operator for Angle struct.

Parameters
aFirst Angle instance.
bSecond Angle instance.
Returns
True if the value of the first Angle instance is greater than the value of the second Angle instance, otherwise false.

◆ operator>=()

bool operator>= ( Angle a,
Angle b )
static

Greater than or equal to operator for Angle struct.

Parameters
aFirst Angle instance.
bSecond Angle instance.
Returns
True if the value of the first Angle instance is greater than or equal to the value of the second Angle instance, otherwise false.