Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


bool2

A 2 component vector of bools.
Read time 2 minutesLast updated 6 days ago

Definition

public struct bool2 : IEquatable<bool2>

Fields

Value

Description

xx component of the vector.
yy component of the vector.

Constructors

Constructor

Description

bool2(System.Boolean)Constructs a bool2 vector from a single bool value by assigning it to every component.
bool2(System.Boolean,System.Boolean)Constructs a bool2 vector from two bool values.
bool2(Unity.Mathematics.bool2)Constructs a bool2 vector from a bool2 vector.

Properties

Property

Description

this[]Returns the bool element at a specified index.
xxSwizzles the vector.
xxxSwizzles the vector.
xxxxSwizzles the vector.
xxxySwizzles the vector.
xxySwizzles the vector.
xxyxSwizzles the vector.
xxyySwizzles the vector.
xySwizzles the vector.
xyxSwizzles the vector.
xyxxSwizzles the vector.
xyxySwizzles the vector.
xyySwizzles the vector.
xyyxSwizzles the vector.
xyyySwizzles the vector.
yxSwizzles the vector.
yxxSwizzles the vector.
yxxxSwizzles the vector.
yxxySwizzles the vector.
yxySwizzles the vector.
yxyxSwizzles the vector.
yxyySwizzles the vector.
yySwizzles the vector.
yyxSwizzles the vector.
yyxxSwizzles the vector.
yyxySwizzles the vector.
yyySwizzles the vector.
yyyxSwizzles the vector.
yyyySwizzles the vector.

Methods

Method

Description

EqualsReturns true if the bool2 is equal to a given bool2, false otherwise.
GetHashCodeReturns a hash code for the bool2.
ToStringReturns a string representation of the bool2.

Operators

Operator

Description

operator &Returns the result of a componentwise bitwise and operation on a bool value and a bool2 vector.
operator |Returns the result of a componentwise bitwise or operation on a bool value and a bool2 vector.
operator ==Returns the result of a componentwise equality operation on a bool value and a bool2 vector.
operator ^Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool2 vector.
bool2Implicitly converts a single bool value to a bool2 vector by assigning it to every component.
operator !=Returns the result of a componentwise not equal operation on a bool value and a bool2 vector.
operator !Returns the result of a componentwise not operation on a bool2 vector.