Struct half4
A 4 component vector of halfs.
Inherited Members
Namespace: Unity.Mathematics
Assembly: solution.dll
Syntax
[Serializable]
public struct half4 : IEquatable<half4>, IFormattable
Constructors
Name | Description |
---|---|
half4(double) | Constructs a half4 vector from a single double value by converting it to half and assigning it to every component. |
half4(float) | Constructs a half4 vector from a single float value by converting it to half and assigning it to every component. |
half4(double4) | Constructs a half4 vector from a double4 vector by componentwise conversion. |
half4(float4) | Constructs a half4 vector from a float4 vector by componentwise conversion. |
half4(half) | Constructs a half4 vector from a single half value by assigning it to every component. |
half4(half, half, half, half) | Constructs a half4 vector from four half values. |
half4(half, half, half2) | Constructs a half4 vector from two half values and a half2 vector. |
half4(half, half2, half) | Constructs a half4 vector from a half value, a half2 vector and a half value. |
half4(half, half3) | Constructs a half4 vector from a half value and a half3 vector. |
half4(half2, half, half) | Constructs a half4 vector from a half2 vector and two half values. |
half4(half2, half2) | Constructs a half4 vector from two half2 vectors. |
half4(half3, half) | Constructs a half4 vector from a half3 vector and a half value. |
half4(half4) | Constructs a half4 vector from a half4 vector. |
Fields
Name | Description |
---|---|
w | w component of the vector. |
x | x component of the vector. |
y | y component of the vector. |
z | z component of the vector. |
zero | half4 zero value. |
Properties
Name | Description |
---|---|
this[int] | Returns the half element at a specified index. |
Methods
Name | Description |
---|---|
Equals(object) | Returns true if the half4 is equal to a given half4, false otherwise. |
Equals(half4) | Returns true if the half4 is equal to a given half4, false otherwise. |
GetHashCode() | Returns a hash code for the half4. |
ToString() | Returns a string representation of the half4. |
ToString(string, IFormatProvider) | Returns a string representation of the half4 using a specified format and culture-specific format information. |
Operators
Name | Description |
---|---|
operator ==(half, half4) | Returns the result of a componentwise equality operation on a half value and a half4 vector. |
operator ==(half4, half) | Returns the result of a componentwise equality operation on a half4 vector and a half value. |
operator ==(half4, half4) | Returns the result of a componentwise equality operation on two half4 vectors. |
explicit operator half4(double) | Explicitly converts a single double value to a half4 vector by converting it to half and assigning it to every component. |
explicit operator half4(float) | Explicitly converts a single float value to a half4 vector by converting it to half and assigning it to every component. |
explicit operator half4(double4) | Explicitly converts a double4 vector to a half4 vector by componentwise conversion. |
explicit operator half4(float4) | Explicitly converts a float4 vector to a half4 vector by componentwise conversion. |
implicit operator half4(half) | Implicitly converts a single half value to a half4 vector by assigning it to every component. |
operator !=(half, half4) | Returns the result of a componentwise not equal operation on a half value and a half4 vector. |
operator !=(half4, half) | Returns the result of a componentwise not equal operation on a half4 vector and a half value. |
operator !=(half4, half4) | Returns the result of a componentwise not equal operation on two half4 vectors. |