Struct float4
A 4 component vector of floats.
Inherited Members
Namespace: Unity.Mathematics
Assembly: solution.dll
Syntax
[Serializable]
public struct float4 : IEquatable<float4>, IFormattable
Constructors
Name | Description |
---|---|
float4(bool) | Constructs a float4 vector from a single bool value by converting it to float and assigning it to every component. |
float4(double) | Constructs a float4 vector from a single double value by converting it to float and assigning it to every component. |
float4(int) | Constructs a float4 vector from a single int value by converting it to float and assigning it to every component. |
float4(float) | Constructs a float4 vector from a single float value by assigning it to every component. |
float4(float, float, float, float) | Constructs a float4 vector from four float values. |
float4(float, float, float2) | Constructs a float4 vector from two float values and a float2 vector. |
float4(float, float2, float) | Constructs a float4 vector from a float value, a float2 vector and a float value. |
float4(float, float3) | Constructs a float4 vector from a float value and a float3 vector. |
float4(uint) | Constructs a float4 vector from a single uint value by converting it to float and assigning it to every component. |
float4(bool4) | Constructs a float4 vector from a bool4 vector by componentwise conversion. |
float4(double4) | Constructs a float4 vector from a double4 vector by componentwise conversion. |
float4(float2, float, float) | Constructs a float4 vector from a float2 vector and two float values. |
float4(float2, float2) | Constructs a float4 vector from two float2 vectors. |
float4(float3, float) | Constructs a float4 vector from a float3 vector and a float value. |
float4(float4) | Constructs a float4 vector from a float4 vector. |
float4(half) | Constructs a float4 vector from a single half value by converting it to float and assigning it to every component. |
float4(half4) | Constructs a float4 vector from a half4 vector by componentwise conversion. |
float4(int4) | Constructs a float4 vector from a int4 vector by componentwise conversion. |
float4(uint4) | Constructs a float4 vector from a uint4 vector by componentwise conversion. |
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 | float4 zero value. |
Properties
Name | Description |
---|---|
this[int] | Returns the float element at a specified index. |
Methods
Name | Description |
---|---|
Equals(object) | Returns true if the float4 is equal to a given float4, false otherwise. |
Equals(float4) | Returns true if the float4 is equal to a given float4, false otherwise. |
GetHashCode() | Returns a hash code for the float4. |
ToString() | Returns a string representation of the float4. |
ToString(string, IFormatProvider) | Returns a string representation of the float4 using a specified format and culture-specific format information. |
Operators
Name | Description |
---|---|
operator +(float, float4) | Returns the result of a componentwise addition operation on a float value and a float4 vector. |
operator +(float4, float) | Returns the result of a componentwise addition operation on a float4 vector and a float value. |
operator +(float4, float4) | Returns the result of a componentwise addition operation on two float4 vectors. |
operator --(float4) | Returns the result of a componentwise decrement operation on a float4 vector. |
operator /(float, float4) | Returns the result of a componentwise division operation on a float value and a float4 vector. |
operator /(float4, float) | Returns the result of a componentwise division operation on a float4 vector and a float value. |
operator /(float4, float4) | Returns the result of a componentwise division operation on two float4 vectors. |
operator ==(float, float4) | Returns the result of a componentwise equality operation on a float value and a float4 vector. |
operator ==(float4, float) | Returns the result of a componentwise equality operation on a float4 vector and a float value. |
operator ==(float4, float4) | Returns the result of a componentwise equality operation on two float4 vectors. |
explicit operator float4(bool) | Explicitly converts a single bool value to a float4 vector by converting it to float and assigning it to every component. |
explicit operator float4(double) | Explicitly converts a single double value to a float4 vector by converting it to float and assigning it to every component. |
explicit operator float4(bool4) | Explicitly converts a bool4 vector to a float4 vector by componentwise conversion. |
explicit operator float4(double4) | Explicitly converts a double4 vector to a float4 vector by componentwise conversion. |
operator >(float, float4) | Returns the result of a componentwise greater than operation on a float value and a float4 vector. |
operator >(float4, float) | Returns the result of a componentwise greater than operation on a float4 vector and a float value. |
operator >(float4, float4) | Returns the result of a componentwise greater than operation on two float4 vectors. |
operator >=(float, float4) | Returns the result of a componentwise greater or equal operation on a float value and a float4 vector. |
operator >=(float4, float) | Returns the result of a componentwise greater or equal operation on a float4 vector and a float value. |
operator >=(float4, float4) | Returns the result of a componentwise greater or equal operation on two float4 vectors. |
implicit operator float4(int) | Implicitly converts a single int value to a float4 vector by converting it to float and assigning it to every component. |
implicit operator float4(float) | Implicitly converts a single float value to a float4 vector by assigning it to every component. |
implicit operator float4(uint) | Implicitly converts a single uint value to a float4 vector by converting it to float and assigning it to every component. |
implicit operator Vector4(float4) | Converts a float4 to Vector4. |
implicit operator float4(half) | Implicitly converts a single half value to a float4 vector by converting it to float and assigning it to every component. |
implicit operator float4(half4) | Implicitly converts a half4 vector to a float4 vector by componentwise conversion. |
implicit operator float4(int4) | Implicitly converts a int4 vector to a float4 vector by componentwise conversion. |
implicit operator float4(uint4) | Implicitly converts a uint4 vector to a float4 vector by componentwise conversion. |
implicit operator float4(Vector4) | Converts a Vector4 to float4. |
operator ++(float4) | Returns the result of a componentwise increment operation on a float4 vector. |
operator !=(float, float4) | Returns the result of a componentwise not equal operation on a float value and a float4 vector. |
operator !=(float4, float) | Returns the result of a componentwise not equal operation on a float4 vector and a float value. |
operator !=(float4, float4) | Returns the result of a componentwise not equal operation on two float4 vectors. |
operator <(float, float4) | Returns the result of a componentwise less than operation on a float value and a float4 vector. |
operator <(float4, float) | Returns the result of a componentwise less than operation on a float4 vector and a float value. |
operator <(float4, float4) | Returns the result of a componentwise less than operation on two float4 vectors. |
operator <=(float, float4) | Returns the result of a componentwise less or equal operation on a float value and a float4 vector. |
operator <=(float4, float) | Returns the result of a componentwise less or equal operation on a float4 vector and a float value. |
operator <=(float4, float4) | Returns the result of a componentwise less or equal operation on two float4 vectors. |
operator %(float, float4) | Returns the result of a componentwise modulus operation on a float value and a float4 vector. |
operator %(float4, float) | Returns the result of a componentwise modulus operation on a float4 vector and a float value. |
operator %(float4, float4) | Returns the result of a componentwise modulus operation on two float4 vectors. |
operator *(float, float4) | Returns the result of a componentwise multiplication operation on a float value and a float4 vector. |
operator *(float4, float) | Returns the result of a componentwise multiplication operation on a float4 vector and a float value. |
operator *(float4, float4) | Returns the result of a componentwise multiplication operation on two float4 vectors. |
operator -(float, float4) | Returns the result of a componentwise subtraction operation on a float value and a float4 vector. |
operator -(float4, float) | Returns the result of a componentwise subtraction operation on a float4 vector and a float value. |
operator -(float4, float4) | Returns the result of a componentwise subtraction operation on two float4 vectors. |
operator -(float4) | Returns the result of a componentwise unary minus operation on a float4 vector. |
operator +(float4) | Returns the result of a componentwise unary plus operation on a float4 vector. |