Photon Fusion 1.1.12

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
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, and IEquatable< Angle >.

Public Member Functions

void Clamp (Angle min, Angle max)
 Clamps the current value to the supplied min-max range. More...
 
bool Equals (Angle other)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 

Static Public Member Functions

static Angle Clamp (Angle value, Angle min, Angle max)
 Returns a the value, clamped to the min-max range. More...
 
static Angle Lerp (Angle a, Angle b, float t)
 Lerps between two angle values. More...
 
static Angle Max (Angle a, Angle b)
 Returns the larger of two supplied angles. More...
 
static Angle Min (Angle a, Angle b)
 Returns the smaller of two supplied angles. More...
 
static implicit operator Angle (double value)
 
static implicit operator Angle (float value)
 
static implicit operator Angle (int value)
 
static operator double (Angle value)
 
static operator float (Angle value)
 
static bool operator!= (Angle a, Angle b)
 
static Angle operator+ (Angle a, Angle b)
 
static Angle operator- (Angle a, Angle b)
 
static bool operator< (Angle a, Angle b)
 
static bool operator<= (Angle a, Angle b)
 
static bool operator== (Angle a, Angle b)
 
static bool operator> (Angle a, Angle b)
 
static bool operator>= (Angle a, Angle b)
 

Public Attributes

int _value
 

Static Public Attributes

const int _360 = 360 * ACCURACY
 
const int ACCURACY = 10000
 
const int DECIMALS = 4
 
const int SIZE = 4
 

Detailed Description

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

Member Function Documentation

◆ Clamp() [1/2]

void Clamp ( Angle  min,
Angle  max 
)

Clamps the current value to the supplied min-max range.

◆ Clamp() [2/2]

static Angle Clamp ( Angle  value,
Angle  min,
Angle  max 
)
static

Returns a the value, clamped to the min-max range.

◆ Lerp()

static Angle Lerp ( Angle  a,
Angle  b,
float  t 
)
static

Lerps between two angle values.

◆ Max()

static Angle Max ( Angle  a,
Angle  b 
)
static

Returns the larger of two supplied angles.

◆ Min()

static Angle Min ( Angle  a,
Angle  b 
)
static

Returns the smaller of two supplied angles.