Photon Fusion 2.0.4

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
FloatCompressed Struct Reference

Represents a compressed float value for network transmission. More...

Inherits INetworkStruct, and IEquatable< FloatCompressed >.

Public Member Functions

bool Equals (FloatCompressed other)
 Checks if the current FloatCompressed instance is equal to the other FloatCompressed instance. More...
 
override bool Equals (object obj)
 Checks if the provided object is a FloatCompressed instance and if it's equal to the current FloatCompressed instance. More...
 
override int GetHashCode ()
 Returns the hash code for the current FloatCompressed instance. More...
 

Static Public Member Functions

static implicit operator float (FloatCompressed q)
 Implicit conversion from FloatCompressed to float. More...
 
static implicit operator FloatCompressed (float v)
 Implicit conversion from float to FloatCompressed. More...
 
static bool operator!= (FloatCompressed left, FloatCompressed right)
 Inequality operator for FloatCompressed struct. More...
 
static bool operator== (FloatCompressed left, FloatCompressed right)
 Equality operator for FloatCompressed struct. More...
 

Public Attributes

int valueEncoded
 Encoded value of the float. More...
 

Detailed Description

Represents a compressed float value for network transmission.

Member Function Documentation

◆ Equals() [1/2]

bool Equals ( FloatCompressed  other)

Checks if the current FloatCompressed instance is equal to the other FloatCompressed instance.

Parameters
otherThe other FloatCompressed instance to compare with the current FloatCompressed instance.
Returns
True if the values of both FloatCompressed instances are equal, otherwise false.

◆ Equals() [2/2]

override bool Equals ( object  obj)

Checks if the provided object is a FloatCompressed instance and if it's equal to the current FloatCompressed instance.

Parameters
objThe object to compare with the current FloatCompressed instance.
Returns
True if the provided object is a FloatCompressed instance and it's equal to the current FloatCompressed instance, otherwise false.

◆ GetHashCode()

override int GetHashCode ( )

Returns the hash code for the current FloatCompressed instance.

Returns
A hash code for the current FloatCompressed instance.

◆ operator float()

static implicit operator float ( FloatCompressed  q)
static

Implicit conversion from FloatCompressed to float.

Parameters
qThe FloatCompressed instance to convert.
Returns
The decompressed float value of the FloatCompressed instance.

◆ operator FloatCompressed()

static implicit operator FloatCompressed ( float  v)
static

Implicit conversion from float to FloatCompressed.

Parameters
vThe float value to convert.
Returns
A new FloatCompressed instance with the compressed value of the float.

◆ operator!=()

static bool operator!= ( FloatCompressed  left,
FloatCompressed  right 
)
static

Inequality operator for FloatCompressed struct.

Parameters
leftFirst FloatCompressed instance.
rightSecond FloatCompressed instance.
Returns
True if the value of the first FloatCompressed instance is not equal to the value of the second FloatCompressed instance, otherwise false.

◆ operator==()

static bool operator== ( FloatCompressed  left,
FloatCompressed  right 
)
static

Equality operator for FloatCompressed struct.

Parameters
leftFirst FloatCompressed instance.
rightSecond FloatCompressed instance.
Returns
True if the value of the first FloatCompressed instance is equal to the value of the second FloatCompressed instance, otherwise false.

Member Data Documentation

◆ valueEncoded

int valueEncoded

Encoded value of the float.