docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct half3

    A 3 component vector of halfs.

    Implements
    IEquatable<half3>
    IFormattable
    Inherited Members
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Mathematics
    Assembly: solution.dll
    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(float)

    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
    this[int]

    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
    operator ==(half, half3)

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

    operator ==(half3, half)

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

    operator ==(half3, half3)

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

    explicit operator half3(double)

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

    explicit operator half3(float)

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

    explicit operator half3(double3)

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

    explicit operator half3(float3)

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

    implicit operator half3(half)

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

    operator !=(half, half3)

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

    operator !=(half3, half)

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

    operator !=(half3, half3)

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

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)