docs.unity.cn
    Show / Hide Table of Contents

    Struct half3

    A 3 component vector of halfs.

    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Mathematics
    Syntax
    [Serializable]
    public struct half3 : IEquatable<half3>, IFormattable

    Constructors

    Name Description
    half3(Double)

    Constructs a half3 vector from a single double value by converting it to half and assigning it to every component.

    half3(Single)

    Constructs a half3 vector from a single float value by converting it to half and assigning it to every component.

    half3(double3)

    Constructs a half3 vector from a double3 vector by componentwise conversion.

    half3(float3)

    Constructs a half3 vector from a float3 vector by componentwise conversion.

    half3(half)

    Constructs a half3 vector from a single half value by assigning it to every component.

    half3(half, half, half)

    Constructs a half3 vector from three half values.

    half3(half, half2)

    Constructs a half3 vector from a half value and a half2 vector.

    half3(half2, half)

    Constructs a half3 vector from a half2 vector and a half value.

    half3(half3)

    Constructs a half3 vector from a half3 vector.

    Fields

    Name Description
    x

    x component of the vector.

    y

    y component of the vector.

    z

    z component of the vector.

    zero

    half3 zero value.

    Properties

    Name Description
    Item[Int32]

    Returns the half element at a specified index.

    Methods

    Name Description
    Equals(Object)

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

    Equals(half3)

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

    GetHashCode()

    Returns a hash code for the half3.

    ToString()

    Returns a string representation of the half3.

    ToString(String, IFormatProvider)

    Returns a string representation of the half3 using a specified format and culture-specific format information.

    Operators

    Name Description
    Equality(half, half3)

    Returns the result of a componentwise equality operation on a half value and a half3 vector.

    Equality(half3, half)

    Returns the result of a componentwise equality operation on a half3 vector and a half value.

    Equality(half3, half3)

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

    Explicit(Double to half3)

    Explicitly converts a single double value to a half3 vector by converting it to half and assigning it to every component.

    Explicit(Single to half3)

    Explicitly converts a single float value to a half3 vector by converting it to half and assigning it to every component.

    Explicit(double3 to half3)

    Explicitly converts a double3 vector to a half3 vector by componentwise conversion.

    Explicit(float3 to half3)

    Explicitly converts a float3 vector to a half3 vector by componentwise conversion.

    Implicit(half to half3)

    Implicitly converts a single half value to a half3 vector by assigning it to every component.

    Inequality(half, half3)

    Returns the result of a componentwise not equal operation on a half value and a half3 vector.

    Inequality(half3, half)

    Returns the result of a componentwise not equal operation on a half3 vector and a half value.

    Inequality(half3, half3)

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

    Back to top
    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