Struct half3 | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct half3

    Namespace: Unity.Mathematics
    Syntax
    public struct half3 : IEquatable<half3>, IFormattable

    Constructors

    half3(Double)

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

    Declaration
    public half3(double v)
    Parameters
    Type Name Description
    System.Double v

    half3(Single)

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

    Declaration
    public half3(float v)
    Parameters
    Type Name Description
    System.Single v

    half3(double3)

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

    Declaration
    public half3(double3 v)
    Parameters
    Type Name Description
    double3 v

    half3(float3)

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

    Declaration
    public half3(float3 v)
    Parameters
    Type Name Description
    float3 v

    half3(half)

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

    Declaration
    public half3(half v)
    Parameters
    Type Name Description
    half v

    half3(half, half, half)

    Constructs a half3 vector from three half values.

    Declaration
    public half3(half x, half y, half z)
    Parameters
    Type Name Description
    half x
    half y
    half z

    half3(half, half2)

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

    Declaration
    public half3(half x, half2 yz)
    Parameters
    Type Name Description
    half x
    half2 yz

    half3(half2, half)

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

    Declaration
    public half3(half2 xy, half z)
    Parameters
    Type Name Description
    half2 xy
    half z

    half3(half3)

    Constructs a half3 vector from a half3 vector.

    Declaration
    public half3(half3 xyz)
    Parameters
    Type Name Description
    half3 xyz

    Fields

    x

    Declaration
    public half x
    Field Value
    Type Description
    half

    y

    Declaration
    public half y
    Field Value
    Type Description
    half

    z

    Declaration
    public half z
    Field Value
    Type Description
    half

    zero

    half3 zero value.

    Declaration
    public static readonly half3 zero
    Field Value
    Type Description
    half3

    Properties

    Item[Int32]

    Returns the half element at a specified index.

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

    xx

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

    xxx

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

    xxxx

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

    xxxy

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

    xxxz

    Declaration
    public half4 xxxz { get; }
    Property Value
    Type Description
    half4

    xxy

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

    xxyx

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

    xxyy

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

    xxyz

    Declaration
    public half4 xxyz { get; }
    Property Value
    Type Description
    half4

    xxz

    Declaration
    public half3 xxz { get; }
    Property Value
    Type Description
    half3

    xxzx

    Declaration
    public half4 xxzx { get; }
    Property Value
    Type Description
    half4

    xxzy

    Declaration
    public half4 xxzy { get; }
    Property Value
    Type Description
    half4

    xxzz

    Declaration
    public half4 xxzz { get; }
    Property Value
    Type Description
    half4

    xy

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

    xyx

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

    xyxx

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

    xyxy

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

    xyxz

    Declaration
    public half4 xyxz { get; }
    Property Value
    Type Description
    half4

    xyy

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

    xyyx

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

    xyyy

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

    xyyz

    Declaration
    public half4 xyyz { get; }
    Property Value
    Type Description
    half4

    xyz

    Declaration
    public half3 xyz { get; set; }
    Property Value
    Type Description
    half3

    xyzx

    Declaration
    public half4 xyzx { get; }
    Property Value
    Type Description
    half4

    xyzy

    Declaration
    public half4 xyzy { get; }
    Property Value
    Type Description
    half4

    xyzz

    Declaration
    public half4 xyzz { get; }
    Property Value
    Type Description
    half4

    xz

    Declaration
    public half2 xz { get; set; }
    Property Value
    Type Description
    half2

    xzx

    Declaration
    public half3 xzx { get; }
    Property Value
    Type Description
    half3

    xzxx

    Declaration
    public half4 xzxx { get; }
    Property Value
    Type Description
    half4

    xzxy

    Declaration
    public half4 xzxy { get; }
    Property Value
    Type Description
    half4

    xzxz

    Declaration
    public half4 xzxz { get; }
    Property Value
    Type Description
    half4

    xzy

    Declaration
    public half3 xzy { get; set; }
    Property Value
    Type Description
    half3

    xzyx

    Declaration
    public half4 xzyx { get; }
    Property Value
    Type Description
    half4

    xzyy

    Declaration
    public half4 xzyy { get; }
    Property Value
    Type Description
    half4

    xzyz

    Declaration
    public half4 xzyz { get; }
    Property Value
    Type Description
    half4

    xzz

    Declaration
    public half3 xzz { get; }
    Property Value
    Type Description
    half3

    xzzx

    Declaration
    public half4 xzzx { get; }
    Property Value
    Type Description
    half4

    xzzy

    Declaration
    public half4 xzzy { get; }
    Property Value
    Type Description
    half4

    xzzz

    Declaration
    public half4 xzzz { get; }
    Property Value
    Type Description
    half4

    yx

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

    yxx

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

    yxxx

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

    yxxy

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

    yxxz

    Declaration
    public half4 yxxz { get; }
    Property Value
    Type Description
    half4

    yxy

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

    yxyx

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

    yxyy

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

    yxyz

    Declaration
    public half4 yxyz { get; }
    Property Value
    Type Description
    half4

    yxz

    Declaration
    public half3 yxz { get; set; }
    Property Value
    Type Description
    half3

    yxzx

    Declaration
    public half4 yxzx { get; }
    Property Value
    Type Description
    half4

    yxzy

    Declaration
    public half4 yxzy { get; }
    Property Value
    Type Description
    half4

    yxzz

    Declaration
    public half4 yxzz { get; }
    Property Value
    Type Description
    half4

    yy

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

    yyx

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

    yyxx

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

    yyxy

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

    yyxz

    Declaration
    public half4 yyxz { get; }
    Property Value
    Type Description
    half4

    yyy

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

    yyyx

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

    yyyy

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

    yyyz

    Declaration
    public half4 yyyz { get; }
    Property Value
    Type Description
    half4

    yyz

    Declaration
    public half3 yyz { get; }
    Property Value
    Type Description
    half3

    yyzx

    Declaration
    public half4 yyzx { get; }
    Property Value
    Type Description
    half4

    yyzy

    Declaration
    public half4 yyzy { get; }
    Property Value
    Type Description
    half4

    yyzz

    Declaration
    public half4 yyzz { get; }
    Property Value
    Type Description
    half4

    yz

    Declaration
    public half2 yz { get; set; }
    Property Value
    Type Description
    half2

    yzx

    Declaration
    public half3 yzx { get; set; }
    Property Value
    Type Description
    half3

    yzxx

    Declaration
    public half4 yzxx { get; }
    Property Value
    Type Description
    half4

    yzxy

    Declaration
    public half4 yzxy { get; }
    Property Value
    Type Description
    half4

    yzxz

    Declaration
    public half4 yzxz { get; }
    Property Value
    Type Description
    half4

    yzy

    Declaration
    public half3 yzy { get; }
    Property Value
    Type Description
    half3

    yzyx

    Declaration
    public half4 yzyx { get; }
    Property Value
    Type Description
    half4

    yzyy

    Declaration
    public half4 yzyy { get; }
    Property Value
    Type Description
    half4

    yzyz

    Declaration
    public half4 yzyz { get; }
    Property Value
    Type Description
    half4

    yzz

    Declaration
    public half3 yzz { get; }
    Property Value
    Type Description
    half3

    yzzx

    Declaration
    public half4 yzzx { get; }
    Property Value
    Type Description
    half4

    yzzy

    Declaration
    public half4 yzzy { get; }
    Property Value
    Type Description
    half4

    yzzz

    Declaration
    public half4 yzzz { get; }
    Property Value
    Type Description
    half4

    zx

    Declaration
    public half2 zx { get; set; }
    Property Value
    Type Description
    half2

    zxx

    Declaration
    public half3 zxx { get; }
    Property Value
    Type Description
    half3

    zxxx

    Declaration
    public half4 zxxx { get; }
    Property Value
    Type Description
    half4

    zxxy

    Declaration
    public half4 zxxy { get; }
    Property Value
    Type Description
    half4

    zxxz

    Declaration
    public half4 zxxz { get; }
    Property Value
    Type Description
    half4

    zxy

    Declaration
    public half3 zxy { get; set; }
    Property Value
    Type Description
    half3

    zxyx

    Declaration
    public half4 zxyx { get; }
    Property Value
    Type Description
    half4

    zxyy

    Declaration
    public half4 zxyy { get; }
    Property Value
    Type Description
    half4

    zxyz

    Declaration
    public half4 zxyz { get; }
    Property Value
    Type Description
    half4

    zxz

    Declaration
    public half3 zxz { get; }
    Property Value
    Type Description
    half3

    zxzx

    Declaration
    public half4 zxzx { get; }
    Property Value
    Type Description
    half4

    zxzy

    Declaration
    public half4 zxzy { get; }
    Property Value
    Type Description
    half4

    zxzz

    Declaration
    public half4 zxzz { get; }
    Property Value
    Type Description
    half4

    zy

    Declaration
    public half2 zy { get; set; }
    Property Value
    Type Description
    half2

    zyx

    Declaration
    public half3 zyx { get; set; }
    Property Value
    Type Description
    half3

    zyxx

    Declaration
    public half4 zyxx { get; }
    Property Value
    Type Description
    half4

    zyxy

    Declaration
    public half4 zyxy { get; }
    Property Value
    Type Description
    half4

    zyxz

    Declaration
    public half4 zyxz { get; }
    Property Value
    Type Description
    half4

    zyy

    Declaration
    public half3 zyy { get; }
    Property Value
    Type Description
    half3

    zyyx

    Declaration
    public half4 zyyx { get; }
    Property Value
    Type Description
    half4

    zyyy

    Declaration
    public half4 zyyy { get; }
    Property Value
    Type Description
    half4

    zyyz

    Declaration
    public half4 zyyz { get; }
    Property Value
    Type Description
    half4

    zyz

    Declaration
    public half3 zyz { get; }
    Property Value
    Type Description
    half3

    zyzx

    Declaration
    public half4 zyzx { get; }
    Property Value
    Type Description
    half4

    zyzy

    Declaration
    public half4 zyzy { get; }
    Property Value
    Type Description
    half4

    zyzz

    Declaration
    public half4 zyzz { get; }
    Property Value
    Type Description
    half4

    zz

    Declaration
    public half2 zz { get; }
    Property Value
    Type Description
    half2

    zzx

    Declaration
    public half3 zzx { get; }
    Property Value
    Type Description
    half3

    zzxx

    Declaration
    public half4 zzxx { get; }
    Property Value
    Type Description
    half4

    zzxy

    Declaration
    public half4 zzxy { get; }
    Property Value
    Type Description
    half4

    zzxz

    Declaration
    public half4 zzxz { get; }
    Property Value
    Type Description
    half4

    zzy

    Declaration
    public half3 zzy { get; }
    Property Value
    Type Description
    half3

    zzyx

    Declaration
    public half4 zzyx { get; }
    Property Value
    Type Description
    half4

    zzyy

    Declaration
    public half4 zzyy { get; }
    Property Value
    Type Description
    half4

    zzyz

    Declaration
    public half4 zzyz { get; }
    Property Value
    Type Description
    half4

    zzz

    Declaration
    public half3 zzz { get; }
    Property Value
    Type Description
    half3

    zzzx

    Declaration
    public half4 zzzx { get; }
    Property Value
    Type Description
    half4

    zzzy

    Declaration
    public half4 zzzy { get; }
    Property Value
    Type Description
    half4

    zzzz

    Declaration
    public half4 zzzz { get; }
    Property Value
    Type Description
    half4

    Methods

    Equals(Object)

    Returns true if the half3 is equal to a given half3, 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(half3)

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

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

    GetHashCode()

    Returns a hash code for the half3.

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

    ToString()

    Returns a string representation of the half3.

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

    ToString(String, IFormatProvider)

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

    Declaration
    public string ToString(string format, IFormatProvider formatProvider)
    Parameters
    Type Name Description
    System.String format
    System.IFormatProvider formatProvider
    Returns
    Type Description
    System.String

    Operators

    Equality(half, half3)

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

    Declaration
    public static bool3 operator ==(half lhs, half3 rhs)
    Parameters
    Type Name Description
    half lhs
    half3 rhs
    Returns
    Type Description
    bool3

    Equality(half3, half)

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

    Declaration
    public static bool3 operator ==(half3 lhs, half rhs)
    Parameters
    Type Name Description
    half3 lhs
    half rhs
    Returns
    Type Description
    bool3

    Equality(half3, half3)

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

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

    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.

    Declaration
    public static explicit operator half3(double v)
    Parameters
    Type Name Description
    System.Double v
    Returns
    Type Description
    half3

    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.

    Declaration
    public static explicit operator half3(float v)
    Parameters
    Type Name Description
    System.Single v
    Returns
    Type Description
    half3

    Explicit(double3 to half3)

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

    Declaration
    public static explicit operator half3(double3 v)
    Parameters
    Type Name Description
    double3 v
    Returns
    Type Description
    half3

    Explicit(float3 to half3)

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

    Declaration
    public static explicit operator half3(float3 v)
    Parameters
    Type Name Description
    float3 v
    Returns
    Type Description
    half3

    Implicit(half to half3)

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

    Declaration
    public static implicit operator half3(half v)
    Parameters
    Type Name Description
    half v
    Returns
    Type Description
    half3

    Inequality(half, half3)

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

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

    Inequality(half3, half)

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

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

    Inequality(half3, half3)

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

    Declaration
    public static bool3 operator !=(half3 lhs, half3 rhs)
    Parameters
    Type Name Description
    half3 lhs
    half3 rhs
    Returns
    Type Description
    bool3
    In This Article
    • Constructors
      • half3(Double)
      • half3(Single)
      • half3(double3)
      • half3(float3)
      • half3(half)
      • half3(half, half, half)
      • half3(half, half2)
      • half3(half2, half)
      • half3(half3)
    • Fields
      • x
      • y
      • z
      • zero
    • Properties
      • Item[Int32]
      • xx
      • xxx
      • xxxx
      • xxxy
      • xxxz
      • xxy
      • xxyx
      • xxyy
      • xxyz
      • xxz
      • xxzx
      • xxzy
      • xxzz
      • xy
      • xyx
      • xyxx
      • xyxy
      • xyxz
      • xyy
      • xyyx
      • xyyy
      • xyyz
      • xyz
      • xyzx
      • xyzy
      • xyzz
      • xz
      • xzx
      • xzxx
      • xzxy
      • xzxz
      • xzy
      • xzyx
      • xzyy
      • xzyz
      • xzz
      • xzzx
      • xzzy
      • xzzz
      • yx
      • yxx
      • yxxx
      • yxxy
      • yxxz
      • yxy
      • yxyx
      • yxyy
      • yxyz
      • yxz
      • yxzx
      • yxzy
      • yxzz
      • yy
      • yyx
      • yyxx
      • yyxy
      • yyxz
      • yyy
      • yyyx
      • yyyy
      • yyyz
      • yyz
      • yyzx
      • yyzy
      • yyzz
      • yz
      • yzx
      • yzxx
      • yzxy
      • yzxz
      • yzy
      • yzyx
      • yzyy
      • yzyz
      • yzz
      • yzzx
      • yzzy
      • yzzz
      • zx
      • zxx
      • zxxx
      • zxxy
      • zxxz
      • zxy
      • zxyx
      • zxyy
      • zxyz
      • zxz
      • zxzx
      • zxzy
      • zxzz
      • zy
      • zyx
      • zyxx
      • zyxy
      • zyxz
      • zyy
      • zyyx
      • zyyy
      • zyyz
      • zyz
      • zyzx
      • zyzy
      • zyzz
      • zz
      • zzx
      • zzxx
      • zzxy
      • zzxz
      • zzy
      • zzyx
      • zzyy
      • zzyz
      • zzz
      • zzzx
      • zzzy
      • zzzz
    • Methods
      • Equals(Object)
      • Equals(half3)
      • GetHashCode()
      • ToString()
      • ToString(String, IFormatProvider)
    • Operators
      • Equality(half, half3)
      • Equality(half3, half)
      • Equality(half3, half3)
      • Explicit(Double to half3)
      • Explicit(Single to half3)
      • Explicit(double3 to half3)
      • Explicit(float3 to half3)
      • Implicit(half to half3)
      • Inequality(half, half3)
      • Inequality(half3, half)
      • Inequality(half3, half3)
    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