Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

bool2

struct in Unity.Mathematics

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A 2 component vector of bools.

Properties

Property Description
this[int]Returns the bool element at a specified index.
xx component of the vector.
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.
yy component of 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.

Constructors

Constructor Description
bool2Constructs a bool2 vector from two bool values.

Public 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
bool2Implicitly converts a single bool value to a bool2 vector by assigning it to every component.
operator !Returns the result of a componentwise not operation on a bool2 vector.
operator !=Returns the result of a componentwise not equal operation on two bool2 vectors.
operator &Returns the result of a componentwise bitwise and operation on two bool2 vectors.
operator ^Returns the result of a componentwise bitwise exclusive or operation on two bool2 vectors.
operator ==Returns the result of a componentwise equality operation on two bool2 vectors.
operator |Returns the result of a componentwise bitwise or operation on two bool2 vectors.