Photon Fusion 2.1.1

FloatCompressed Struct Reference

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

Inherits INetworkStruct.

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

int valueEncoded
 Encoded value of the float.

Detailed Description

Represents a compressed float value for network transmission.

Member Function Documentation

◆ Equals() [1/2]

readonly 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 readonly 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 readonly int GetHashCode ( )

Returns the hash code for the current FloatCompressed instance.

Returns
A hash code for the current FloatCompressed instance.

◆ operator float()

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()

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!=()

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==()

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.