Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

float4

struct in Unity.Mathematics

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A 4 component vector of floats.

Static Properties

Property Description
zerofloat4 zero value.

Properties

Property Description
this[int]Returns the float element at a specified index.
ww component of the vector.
wwSwizzles the vector.
wwwSwizzles the vector.
wwwwSwizzles the vector.
wwwxSwizzles the vector.
wwwySwizzles the vector.
wwwzSwizzles the vector.
wwxSwizzles the vector.
wwxwSwizzles the vector.
wwxxSwizzles the vector.
wwxySwizzles the vector.
wwxzSwizzles the vector.
wwySwizzles the vector.
wwywSwizzles the vector.
wwyxSwizzles the vector.
wwyySwizzles the vector.
wwyzSwizzles the vector.
wwzSwizzles the vector.
wwzwSwizzles the vector.
wwzxSwizzles the vector.
wwzySwizzles the vector.
wwzzSwizzles the vector.
wxSwizzles the vector.
wxwSwizzles the vector.
wxwwSwizzles the vector.
wxwxSwizzles the vector.
wxwySwizzles the vector.
wxwzSwizzles the vector.
wxxSwizzles the vector.
wxxwSwizzles the vector.
wxxxSwizzles the vector.
wxxySwizzles the vector.
wxxzSwizzles the vector.
wxySwizzles the vector.
wxywSwizzles the vector.
wxyxSwizzles the vector.
wxyySwizzles the vector.
wxyzSwizzles the vector.
wxzSwizzles the vector.
wxzwSwizzles the vector.
wxzxSwizzles the vector.
wxzySwizzles the vector.
wxzzSwizzles the vector.
wySwizzles the vector.
wywSwizzles the vector.
wywwSwizzles the vector.
wywxSwizzles the vector.
wywySwizzles the vector.
wywzSwizzles the vector.
wyxSwizzles the vector.
wyxwSwizzles the vector.
wyxxSwizzles the vector.
wyxySwizzles the vector.
wyxzSwizzles the vector.
wyySwizzles the vector.
wyywSwizzles the vector.
wyyxSwizzles the vector.
wyyySwizzles the vector.
wyyzSwizzles the vector.
wyzSwizzles the vector.
wyzwSwizzles the vector.
wyzxSwizzles the vector.
wyzySwizzles the vector.
wyzzSwizzles the vector.
wzSwizzles the vector.
wzwSwizzles the vector.
wzwwSwizzles the vector.
wzwxSwizzles the vector.
wzwySwizzles the vector.
wzwzSwizzles the vector.
wzxSwizzles the vector.
wzxwSwizzles the vector.
wzxxSwizzles the vector.
wzxySwizzles the vector.
wzxzSwizzles the vector.
wzySwizzles the vector.
wzywSwizzles the vector.
wzyxSwizzles the vector.
wzyySwizzles the vector.
wzyzSwizzles the vector.
wzzSwizzles the vector.
wzzwSwizzles the vector.
wzzxSwizzles the vector.
wzzySwizzles the vector.
wzzzSwizzles the vector.
xx component of the vector.
xwSwizzles the vector.
xwwSwizzles the vector.
xwwwSwizzles the vector.
xwwxSwizzles the vector.
xwwySwizzles the vector.
xwwzSwizzles the vector.
xwxSwizzles the vector.
xwxwSwizzles the vector.
xwxxSwizzles the vector.
xwxySwizzles the vector.
xwxzSwizzles the vector.
xwySwizzles the vector.
xwywSwizzles the vector.
xwyxSwizzles the vector.
xwyySwizzles the vector.
xwyzSwizzles the vector.
xwzSwizzles the vector.
xwzwSwizzles the vector.
xwzxSwizzles the vector.
xwzySwizzles the vector.
xwzzSwizzles the vector.
xxSwizzles the vector.
xxwSwizzles the vector.
xxwwSwizzles the vector.
xxwxSwizzles the vector.
xxwySwizzles the vector.
xxwzSwizzles the vector.
xxxSwizzles the vector.
xxxwSwizzles the vector.
xxxxSwizzles the vector.
xxxySwizzles the vector.
xxxzSwizzles the vector.
xxySwizzles the vector.
xxywSwizzles the vector.
xxyxSwizzles the vector.
xxyySwizzles the vector.
xxyzSwizzles the vector.
xxzSwizzles the vector.
xxzwSwizzles the vector.
xxzxSwizzles the vector.
xxzySwizzles the vector.
xxzzSwizzles the vector.
xySwizzles the vector.
xywSwizzles the vector.
xywwSwizzles the vector.
xywxSwizzles the vector.
xywySwizzles the vector.
xywzSwizzles the vector.
xyxSwizzles the vector.
xyxwSwizzles the vector.
xyxxSwizzles the vector.
xyxySwizzles the vector.
xyxzSwizzles the vector.
xyySwizzles the vector.
xyywSwizzles the vector.
xyyxSwizzles the vector.
xyyySwizzles the vector.
xyyzSwizzles the vector.
xyzSwizzles the vector.
xyzwSwizzles the vector.
xyzxSwizzles the vector.
xyzySwizzles the vector.
xyzzSwizzles the vector.
xzSwizzles the vector.
xzwSwizzles the vector.
xzwwSwizzles the vector.
xzwxSwizzles the vector.
xzwySwizzles the vector.
xzwzSwizzles the vector.
xzxSwizzles the vector.
xzxwSwizzles the vector.
xzxxSwizzles the vector.
xzxySwizzles the vector.
xzxzSwizzles the vector.
xzySwizzles the vector.
xzywSwizzles the vector.
xzyxSwizzles the vector.
xzyySwizzles the vector.
xzyzSwizzles the vector.
xzzSwizzles the vector.
xzzwSwizzles the vector.
xzzxSwizzles the vector.
xzzySwizzles the vector.
xzzzSwizzles the vector.
yy component of the vector.
ywSwizzles the vector.
ywwSwizzles the vector.
ywwwSwizzles the vector.
ywwxSwizzles the vector.
ywwySwizzles the vector.
ywwzSwizzles the vector.
ywxSwizzles the vector.
ywxwSwizzles the vector.
ywxxSwizzles the vector.
ywxySwizzles the vector.
ywxzSwizzles the vector.
ywySwizzles the vector.
ywywSwizzles the vector.
ywyxSwizzles the vector.
ywyySwizzles the vector.
ywyzSwizzles the vector.
ywzSwizzles the vector.
ywzwSwizzles the vector.
ywzxSwizzles the vector.
ywzySwizzles the vector.
ywzzSwizzles the vector.
yxSwizzles the vector.
yxwSwizzles the vector.
yxwwSwizzles the vector.
yxwxSwizzles the vector.
yxwySwizzles the vector.
yxwzSwizzles the vector.
yxxSwizzles the vector.
yxxwSwizzles the vector.
yxxxSwizzles the vector.
yxxySwizzles the vector.
yxxzSwizzles the vector.
yxySwizzles the vector.
yxywSwizzles the vector.
yxyxSwizzles the vector.
yxyySwizzles the vector.
yxyzSwizzles the vector.
yxzSwizzles the vector.
yxzwSwizzles the vector.
yxzxSwizzles the vector.
yxzySwizzles the vector.
yxzzSwizzles the vector.
yySwizzles the vector.
yywSwizzles the vector.
yywwSwizzles the vector.
yywxSwizzles the vector.
yywySwizzles the vector.
yywzSwizzles the vector.
yyxSwizzles the vector.
yyxwSwizzles the vector.
yyxxSwizzles the vector.
yyxySwizzles the vector.
yyxzSwizzles the vector.
yyySwizzles the vector.
yyywSwizzles the vector.
yyyxSwizzles the vector.
yyyySwizzles the vector.
yyyzSwizzles the vector.
yyzSwizzles the vector.
yyzwSwizzles the vector.
yyzxSwizzles the vector.
yyzySwizzles the vector.
yyzzSwizzles the vector.
yzSwizzles the vector.
yzwSwizzles the vector.
yzwwSwizzles the vector.
yzwxSwizzles the vector.
yzwySwizzles the vector.
yzwzSwizzles the vector.
yzxSwizzles the vector.
yzxwSwizzles the vector.
yzxxSwizzles the vector.
yzxySwizzles the vector.
yzxzSwizzles the vector.
yzySwizzles the vector.
yzywSwizzles the vector.
yzyxSwizzles the vector.
yzyySwizzles the vector.
yzyzSwizzles the vector.
yzzSwizzles the vector.
yzzwSwizzles the vector.
yzzxSwizzles the vector.
yzzySwizzles the vector.
yzzzSwizzles the vector.
zz component of the vector.
zwSwizzles the vector.
zwwSwizzles the vector.
zwwwSwizzles the vector.
zwwxSwizzles the vector.
zwwySwizzles the vector.
zwwzSwizzles the vector.
zwxSwizzles the vector.
zwxwSwizzles the vector.
zwxxSwizzles the vector.
zwxySwizzles the vector.
zwxzSwizzles the vector.
zwySwizzles the vector.
zwywSwizzles the vector.
zwyxSwizzles the vector.
zwyySwizzles the vector.
zwyzSwizzles the vector.
zwzSwizzles the vector.
zwzwSwizzles the vector.
zwzxSwizzles the vector.
zwzySwizzles the vector.
zwzzSwizzles the vector.
zxSwizzles the vector.
zxwSwizzles the vector.
zxwwSwizzles the vector.
zxwxSwizzles the vector.
zxwySwizzles the vector.
zxwzSwizzles the vector.
zxxSwizzles the vector.
zxxwSwizzles the vector.
zxxxSwizzles the vector.
zxxySwizzles the vector.
zxxzSwizzles the vector.
zxySwizzles the vector.
zxywSwizzles the vector.
zxyxSwizzles the vector.
zxyySwizzles the vector.
zxyzSwizzles the vector.
zxzSwizzles the vector.
zxzwSwizzles the vector.
zxzxSwizzles the vector.
zxzySwizzles the vector.
zxzzSwizzles the vector.
zySwizzles the vector.
zywSwizzles the vector.
zywwSwizzles the vector.
zywxSwizzles the vector.
zywySwizzles the vector.
zywzSwizzles the vector.
zyxSwizzles the vector.
zyxwSwizzles the vector.
zyxxSwizzles the vector.
zyxySwizzles the vector.
zyxzSwizzles the vector.
zyySwizzles the vector.
zyywSwizzles the vector.
zyyxSwizzles the vector.
zyyySwizzles the vector.
zyyzSwizzles the vector.
zyzSwizzles the vector.
zyzwSwizzles the vector.
zyzxSwizzles the vector.
zyzySwizzles the vector.
zyzzSwizzles the vector.
zzSwizzles the vector.
zzwSwizzles the vector.
zzwwSwizzles the vector.
zzwxSwizzles the vector.
zzwySwizzles the vector.
zzwzSwizzles the vector.
zzxSwizzles the vector.
zzxwSwizzles the vector.
zzxxSwizzles the vector.
zzxySwizzles the vector.
zzxzSwizzles the vector.
zzySwizzles the vector.
zzywSwizzles the vector.
zzyxSwizzles the vector.
zzyySwizzles the vector.
zzyzSwizzles the vector.
zzzSwizzles the vector.
zzzwSwizzles the vector.
zzzxSwizzles the vector.
zzzySwizzles the vector.
zzzzSwizzles the vector.

Constructors

Constructor Description
float4Constructs a float4 vector from four float values.

Public Methods

Method Description
EqualsReturns true if the float4 is equal to a given float4, false otherwise.
GetHashCodeReturns a hash code for the float4.
ToStringReturns a string representation of the float4.

Operators

Operator Description
float4Implicitly converts a single float value to a float4 vector by assigning it to every component.
float4Explicitly converts a single bool value to a float4 vector by converting it to float and assigning it to every component.
float4Explicitly converts a bool4 vector to a float4 vector by componentwise conversion.
float4Implicitly converts a single int value to a float4 vector by converting it to float and assigning it to every component.
float4Implicitly converts a int4 vector to a float4 vector by componentwise conversion.
float4Implicitly converts a single uint value to a float4 vector by converting it to float and assigning it to every component.
float4Implicitly converts a uint4 vector to a float4 vector by componentwise conversion.
float4Implicitly converts a single half value to a float4 vector by converting it to float and assigning it to every component.
float4Implicitly converts a half4 vector to a float4 vector by componentwise conversion.
float4Explicitly converts a single double value to a float4 vector by converting it to float and assigning it to every component.
float4Explicitly converts a double4 vector to a float4 vector by componentwise conversion.
operator -Returns the result of a componentwise subtraction operation on two float4 vectors.
operator --Returns the result of a componentwise decrement operation on a float4 vector.
operator !=Returns the result of a componentwise not equal operation on two float4 vectors.
operator *Returns the result of a componentwise multiplication operation on two float4 vectors.
operator /Returns the result of a componentwise division operation on two float4 vectors.
operator %Returns the result of a componentwise modulus operation on two float4 vectors.
operator +Returns the result of a componentwise addition operation on two float4 vectors.
operator +Returns the result of a componentwise unary plus operation on a float4 vector.
operator ++Returns the result of a componentwise increment operation on a float4 vector.
operator <Returns the result of a componentwise less than operation on two float4 vectors.
operator <=Returns the result of a componentwise less or equal operation on two float4 vectors.
operator ==Returns the result of a componentwise equality operation on two float4 vectors.
operator >Returns the result of a componentwise greater than operation on two float4 vectors.
operator >=Returns the result of a componentwise greater or equal operation on two float4 vectors.