Struct bool2 | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Struct bool2

    Namespace: Unity.Mathematics
    Syntax
    [Serializable]
    public struct bool2 : IEquatable<bool2>

    Constructors

    bool2(Boolean)

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

    Declaration
    public bool2(bool v)
    Parameters
    Type Name Description
    System.Boolean v

    bool2(Boolean, Boolean)

    Constructs a bool2 vector from two bool values.

    Declaration
    public bool2(bool x, bool y)
    Parameters
    Type Name Description
    System.Boolean x
    System.Boolean y

    bool2(bool2)

    Constructs a bool2 vector from a bool2 vector.

    Declaration
    public bool2(bool2 xy)
    Parameters
    Type Name Description
    bool2 xy

    Fields

    x

    Declaration
    public bool x
    Field Value
    Type Description
    System.Boolean

    y

    Declaration
    public bool y
    Field Value
    Type Description
    System.Boolean

    Properties

    Item[Int32]

    Returns the bool element at a specified index.

    Declaration
    public bool this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    System.Boolean

    xx

    Declaration
    public bool2 xx { get; }
    Property Value
    Type Description
    bool2

    xxx

    Declaration
    public bool3 xxx { get; }
    Property Value
    Type Description
    bool3

    xxxx

    Declaration
    public bool4 xxxx { get; }
    Property Value
    Type Description
    bool4

    xxxy

    Declaration
    public bool4 xxxy { get; }
    Property Value
    Type Description
    bool4

    xxy

    Declaration
    public bool3 xxy { get; }
    Property Value
    Type Description
    bool3

    xxyx

    Declaration
    public bool4 xxyx { get; }
    Property Value
    Type Description
    bool4

    xxyy

    Declaration
    public bool4 xxyy { get; }
    Property Value
    Type Description
    bool4

    xy

    Declaration
    public bool2 xy { get; set; }
    Property Value
    Type Description
    bool2

    xyx

    Declaration
    public bool3 xyx { get; }
    Property Value
    Type Description
    bool3

    xyxx

    Declaration
    public bool4 xyxx { get; }
    Property Value
    Type Description
    bool4

    xyxy

    Declaration
    public bool4 xyxy { get; }
    Property Value
    Type Description
    bool4

    xyy

    Declaration
    public bool3 xyy { get; }
    Property Value
    Type Description
    bool3

    xyyx

    Declaration
    public bool4 xyyx { get; }
    Property Value
    Type Description
    bool4

    xyyy

    Declaration
    public bool4 xyyy { get; }
    Property Value
    Type Description
    bool4

    yx

    Declaration
    public bool2 yx { get; set; }
    Property Value
    Type Description
    bool2

    yxx

    Declaration
    public bool3 yxx { get; }
    Property Value
    Type Description
    bool3

    yxxx

    Declaration
    public bool4 yxxx { get; }
    Property Value
    Type Description
    bool4

    yxxy

    Declaration
    public bool4 yxxy { get; }
    Property Value
    Type Description
    bool4

    yxy

    Declaration
    public bool3 yxy { get; }
    Property Value
    Type Description
    bool3

    yxyx

    Declaration
    public bool4 yxyx { get; }
    Property Value
    Type Description
    bool4

    yxyy

    Declaration
    public bool4 yxyy { get; }
    Property Value
    Type Description
    bool4

    yy

    Declaration
    public bool2 yy { get; }
    Property Value
    Type Description
    bool2

    yyx

    Declaration
    public bool3 yyx { get; }
    Property Value
    Type Description
    bool3

    yyxx

    Declaration
    public bool4 yyxx { get; }
    Property Value
    Type Description
    bool4

    yyxy

    Declaration
    public bool4 yyxy { get; }
    Property Value
    Type Description
    bool4

    yyy

    Declaration
    public bool3 yyy { get; }
    Property Value
    Type Description
    bool3

    yyyx

    Declaration
    public bool4 yyyx { get; }
    Property Value
    Type Description
    bool4

    yyyy

    Declaration
    public bool4 yyyy { get; }
    Property Value
    Type Description
    bool4

    Methods

    Equals(Object)

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

    Declaration
    public override bool Equals(object o)
    Parameters
    Type Name Description
    System.Object o
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)

    Equals(bool2)

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

    Declaration
    public bool Equals(bool2 rhs)
    Parameters
    Type Name Description
    bool2 rhs
    Returns
    Type Description
    System.Boolean

    GetHashCode()

    Returns a hash code for the bool2.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Returns a string representation of the bool2.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.ValueType.ToString()

    Operators

    BitwiseAnd(Boolean, bool2)

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

    Declaration
    public static bool2 operator &(bool lhs, bool2 rhs)
    Parameters
    Type Name Description
    System.Boolean lhs
    bool2 rhs
    Returns
    Type Description
    bool2

    BitwiseAnd(bool2, Boolean)

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

    Declaration
    public static bool2 operator &(bool2 lhs, bool rhs)
    Parameters
    Type Name Description
    bool2 lhs
    System.Boolean rhs
    Returns
    Type Description
    bool2

    BitwiseAnd(bool2, bool2)

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

    Declaration
    public static bool2 operator &(bool2 lhs, bool2 rhs)
    Parameters
    Type Name Description
    bool2 lhs
    bool2 rhs
    Returns
    Type Description
    bool2

    BitwiseOr(Boolean, bool2)

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

    Declaration
    public static bool2 operator |(bool lhs, bool2 rhs)
    Parameters
    Type Name Description
    System.Boolean lhs
    bool2 rhs
    Returns
    Type Description
    bool2

    BitwiseOr(bool2, Boolean)

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

    Declaration
    public static bool2 operator |(bool2 lhs, bool rhs)
    Parameters
    Type Name Description
    bool2 lhs
    System.Boolean rhs
    Returns
    Type Description
    bool2

    BitwiseOr(bool2, bool2)

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

    Declaration
    public static bool2 operator |(bool2 lhs, bool2 rhs)
    Parameters
    Type Name Description
    bool2 lhs
    bool2 rhs
    Returns
    Type Description
    bool2

    Equality(Boolean, bool2)

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

    Declaration
    public static bool2 operator ==(bool lhs, bool2 rhs)
    Parameters
    Type Name Description
    System.Boolean lhs
    bool2 rhs
    Returns
    Type Description
    bool2

    Equality(bool2, Boolean)

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

    Declaration
    public static bool2 operator ==(bool2 lhs, bool rhs)
    Parameters
    Type Name Description
    bool2 lhs
    System.Boolean rhs
    Returns
    Type Description
    bool2

    Equality(bool2, bool2)

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

    Declaration
    public static bool2 operator ==(bool2 lhs, bool2 rhs)
    Parameters
    Type Name Description
    bool2 lhs
    bool2 rhs
    Returns
    Type Description
    bool2

    ExclusiveOr(Boolean, bool2)

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

    Declaration
    public static bool2 operator ^(bool lhs, bool2 rhs)
    Parameters
    Type Name Description
    System.Boolean lhs
    bool2 rhs
    Returns
    Type Description
    bool2

    ExclusiveOr(bool2, Boolean)

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

    Declaration
    public static bool2 operator ^(bool2 lhs, bool rhs)
    Parameters
    Type Name Description
    bool2 lhs
    System.Boolean rhs
    Returns
    Type Description
    bool2

    ExclusiveOr(bool2, bool2)

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

    Declaration
    public static bool2 operator ^(bool2 lhs, bool2 rhs)
    Parameters
    Type Name Description
    bool2 lhs
    bool2 rhs
    Returns
    Type Description
    bool2

    Implicit(Boolean to bool2)

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

    Declaration
    public static implicit operator bool2(bool v)
    Parameters
    Type Name Description
    System.Boolean v
    Returns
    Type Description
    bool2

    Inequality(Boolean, bool2)

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

    Declaration
    public static bool2 operator !=(bool lhs, bool2 rhs)
    Parameters
    Type Name Description
    System.Boolean lhs
    bool2 rhs
    Returns
    Type Description
    bool2

    Inequality(bool2, Boolean)

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

    Declaration
    public static bool2 operator !=(bool2 lhs, bool rhs)
    Parameters
    Type Name Description
    bool2 lhs
    System.Boolean rhs
    Returns
    Type Description
    bool2

    Inequality(bool2, bool2)

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

    Declaration
    public static bool2 operator !=(bool2 lhs, bool2 rhs)
    Parameters
    Type Name Description
    bool2 lhs
    bool2 rhs
    Returns
    Type Description
    bool2

    LogicalNot(bool2)

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

    Declaration
    public static bool2 operator !(bool2 val)
    Parameters
    Type Name Description
    bool2 val
    Returns
    Type Description
    bool2
    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX