bool2
A 2 component vector of bools.
Read time 2 minutesLast updated 6 days ago
Definition
- Type: Struct
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
- Implements: IEquatable<bool2>
public struct bool2 : IEquatable<bool2>
Fields
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. |
| xx | Swizzles the vector. |
| xxx | Swizzles the vector. |
| xxxx | Swizzles the vector. |
| xxxy | Swizzles the vector. |
| xxy | Swizzles the vector. |
| xxyx | Swizzles the vector. |
| xxyy | Swizzles the vector. |
| xy | Swizzles the vector. |
| xyx | Swizzles the vector. |
| xyxx | Swizzles the vector. |
| xyxy | Swizzles the vector. |
| xyy | Swizzles the vector. |
| xyyx | Swizzles the vector. |
| xyyy | Swizzles the vector. |
| yx | Swizzles the vector. |
| yxx | Swizzles the vector. |
| yxxx | Swizzles the vector. |
| yxxy | Swizzles the vector. |
| yxy | Swizzles the vector. |
| yxyx | Swizzles the vector. |
| yxyy | Swizzles the vector. |
| yy | Swizzles the vector. |
| yyx | Swizzles the vector. |
| yyxx | Swizzles the vector. |
| yyxy | Swizzles the vector. |
| yyy | Swizzles the vector. |
| yyyx | Swizzles the vector. |
| yyyy | Swizzles the vector. |
Methods
Method | Description |
|---|---|
| Equals | Returns true if the bool2 is equal to a given bool2, false otherwise. |
| GetHashCode | Returns a hash code for the bool2. |
| ToString | Returns 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. |
| bool2 | Implicitly 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. |