Photon Fusion 2.1.1

Mask256 Struct Reference

Mask256 is a 256-bit mask that can be used to store 256 boolean values. More...

Public Member Functions

void Clear ()
 Sets all bits to 0.
readonly bool Equals (Mask256 other)
 Returns true if the masks are equal.
readonly override bool Equals (object obj)
 Returns true if the masks are equal.
readonly bool GetBit (int bitIndex)
 Returns a specific bit from the mask.
readonly override int GetHashCode ()
 Calculates the hash code of the mask.
readonly bool IsNothing ()
 Returns true if the mask is empty.
 Mask256 (long a, long b=0, long c=0, long d=0)
 Creates a new mask with specified initial values.
void SetBit (int bitIndex, bool set)
 Sets a specific bit in the mask.
readonly override string ToString ()
 Converts the mask to a string in the form of "a:b:c:d".

Static Public Member Functions

static implicit operator long (Mask256 mask)
 Equivalent to.
static implicit operator Mask256 (long value)
 Converts a long value to a mask.
static Mask256 operator& (Mask256 a, Mask256 b)
 Performs a logical-AND operation.
static Mask256 operator| (Mask256 a, Mask256 b)
 Performs a logical-OR operation.
static Mask256 operator~ (Mask256 a)
 Performs a logical-NOT operation.

Properties

long this[int i] [get, set]
 Returns selected 64-bit value from the mask.

Detailed Description

Mask256 is a 256-bit mask that can be used to store 256 boolean values.

Member Function Documentation

◆ IsNothing()

readonly bool IsNothing ( )

Returns true if the mask is empty.

Returns

◆ operator long()

implicit operator long ( Mask256 mask)
static

Equivalent to.

mask[0]

Property Documentation

◆ this[int i]

long this[int i]
getset

Returns selected 64-bit value from the mask.

Parameters
i