docs.unity3d.com
    Show / Hide Table of Contents

    Struct bool2

    A 2 component vector of bools.

    Namespace: Unity.Mathematics
    Syntax
    public struct bool2 : System.IEquatable<bool2>

    Constructors

    Name Description
    bool2(Boolean)

    Constructs a bool2 vector from a single bool value by assigning it to every component.

    bool2(Boolean, Boolean)

    Constructs a bool2 vector from two bool values.

    bool2(bool2)

    Constructs a bool2 vector from a bool2 vector.

    Fields

    Name Description
    x

    x component of the vector.

    y

    y component of the vector.

    Properties

    Name Description
    Item[Int32]

    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

    Name Description
    Equals(Object)

    Returns true if the bool2 is equal to a given bool2, false otherwise.

    Equals(bool2)

    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

    Name Description
    BitwiseAnd(Boolean, bool2)

    Returns the result of a componentwise bitwise and operation on a bool value and a bool2 vector.

    BitwiseAnd(bool2, Boolean)

    Returns the result of a componentwise bitwise and operation on a bool2 vector and a bool value.

    BitwiseAnd(bool2, bool2)

    Returns the result of a componentwise bitwise and operation on two bool2 vectors.

    BitwiseOr(Boolean, bool2)

    Returns the result of a componentwise bitwise or operation on a bool value and a bool2 vector.

    BitwiseOr(bool2, Boolean)

    Returns the result of a componentwise bitwise or operation on a bool2 vector and a bool value.

    BitwiseOr(bool2, bool2)

    Returns the result of a componentwise bitwise or operation on two bool2 vectors.

    Equality(Boolean, bool2)

    Returns the result of a componentwise equality operation on a bool value and a bool2 vector.

    Equality(bool2, Boolean)

    Returns the result of a componentwise equality operation on a bool2 vector and a bool value.

    Equality(bool2, bool2)

    Returns the result of a componentwise equality operation on two bool2 vectors.

    ExclusiveOr(Boolean, bool2)

    Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool2 vector.

    ExclusiveOr(bool2, Boolean)

    Returns the result of a componentwise bitwise exclusive or operation on a bool2 vector and a bool value.

    ExclusiveOr(bool2, bool2)

    Returns the result of a componentwise bitwise exclusive or operation on two bool2 vectors.

    Implicit(Boolean to bool2)

    Implicitly converts a single bool value to a bool2 vector by assigning it to every component.

    Inequality(Boolean, bool2)

    Returns the result of a componentwise not equal operation on a bool value and a bool2 vector.

    Inequality(bool2, Boolean)

    Returns the result of a componentwise not equal operation on a bool2 vector and a bool value.

    Inequality(bool2, bool2)

    Returns the result of a componentwise not equal operation on two bool2 vectors.

    LogicalNot(bool2)

    Returns the result of a componentwise not operation on a bool2 vector.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023