float4
struct float4Available without an import.
A four-component floating-point vector with x, y, z, and w fields. Arithmetic is component-wise. Swizzle getters select two to four components in their written order and may repeat them. Swizzles with no repeated component also have setters; assigning zw writes value.x to z and value.y to w.
Members
xfield
public float xThe x component.
yfield
public float yThe y component.
zfield
public float zThe z component.
wfield
public float wThe w component.
constructorconstructor
public constructor (float x, float y, float z, float w)Stores the supplied components in order.
FromScalarconstructor
public constructor FromScalar (float value)Copies the same scalar into every component.
From3constructor
public constructor From3 (float3 xyz, float w)Copies the supplied vector components and any remaining scalar component in order.
From2constructor
public constructor From2 (float2 xy, float2 zw)Copies the supplied vector components and any remaining scalar/vector components in order.
From2Scalarconstructor
public constructor From2Scalar (float2 xy, float z, float w)Copies x/y from the vector and z/w from the scalars.
Zerogetter
public static get Zero() : float4The all-zero vector.
Onegetter
public static get One() : float4The all-one vector.
UnitXgetter
public static get UnitX() : float4The unit vector along the X axis; all other components are zero.
UnitYgetter
public static get UnitY() : float4The unit vector along the Y axis; all other components are zero.
UnitZgetter
public static get UnitZ() : float4The unit vector along the Z axis; all other components are zero.
UnitWgetter
public static get UnitW() : float4The unit vector along the W axis; all other components are zero.
lengthSquaredgetter
public get lengthSquared() : floatReturns the sum of squared components without taking a square root.
lengthgetter
public get length() : floatReturns the Euclidean magnitude.
normalizedgetter
public get normalized() : float4Divides by the Euclidean magnitude. A zero magnitude returns the zero vector.
isZerogetter
public get isZero() : boolTests whether every component is exactly zero; uses no tolerance.
Dotmethod
public static fn Dot(float4 a, float4 b) : floatReturns the sum of component-wise products.
Distancemethod
public static fn Distance(float4 a, float4 b) : floatReturns the Euclidean distance between vectors.
DistanceSquaredmethod
public static fn DistanceSquared(float4 a, float4 b) : floatReturns squared Euclidean distance, avoiding a square root.
Lerpmethod
public static fn Lerp(float4 a, float4 b, float t) : float4Interpolates component-wise as a + t*(b-a). Does not clamp t.
Reflectmethod
public static fn Reflect(float4 v, float4 normal) : float4Reflects v around the supplied unit normal. Does not normalize normal.
Minmethod
public static fn Min(float4 a, float4 b) : float4Takes the scalar Math.Min of each component pair, including its NaN and signed-zero rules.
Maxmethod
public static fn Max(float4 a, float4 b) : float4Takes the scalar Math.Max of each component pair, including its NaN and signed-zero rules.
Absmethod
public static fn Abs(float4 v) : float4Takes the absolute value of every component.
Clampmethod
public static fn Clamp(float4 v, float4 lo, float4 hi) : float4Clamps each component between the corresponding ordered lo and hi bounds.
SmoothStepmethod
public static fn SmoothStep(float4 a, float4 b, float t) : float4Clamps t to [0, 1], applies the cubic tt(3-2*t), and interpolates between a and b.
MoveTowardsmethod
public static fn MoveTowards(float4 current, float4 target, float maxDistanceDelta) : float4Moves toward target by at most maxDistanceDelta in Euclidean distance without overshooting. Supply a nonnegative delta.
xxgetter
public get xx() : float2xygetter
public get xy() : float2xysetter
public set xy(float2 value) : voidxzgetter
public get xz() : float2xzsetter
public set xz(float2 value) : voidxwgetter
public get xw() : float2xwsetter
public set xw(float2 value) : voidyxgetter
public get yx() : float2yxsetter
public set yx(float2 value) : voidyygetter
public get yy() : float2yzgetter
public get yz() : float2yzsetter
public set yz(float2 value) : voidywgetter
public get yw() : float2ywsetter
public set yw(float2 value) : voidzxgetter
public get zx() : float2zxsetter
public set zx(float2 value) : voidzygetter
public get zy() : float2zysetter
public set zy(float2 value) : voidzzgetter
public get zz() : float2zwgetter
public get zw() : float2zwsetter
public set zw(float2 value) : voidwxgetter
public get wx() : float2wxsetter
public set wx(float2 value) : voidwygetter
public get wy() : float2wysetter
public set wy(float2 value) : voidwzgetter
public get wz() : float2wzsetter
public set wz(float2 value) : voidwwgetter
public get ww() : float2xxxgetter
public get xxx() : float3xxygetter
public get xxy() : float3xxzgetter
public get xxz() : float3xxwgetter
public get xxw() : float3xyxgetter
public get xyx() : float3xyygetter
public get xyy() : float3xyzgetter
public get xyz() : float3xyzsetter
public set xyz(float3 value) : voidxywgetter
public get xyw() : float3xywsetter
public set xyw(float3 value) : voidxzxgetter
public get xzx() : float3xzygetter
public get xzy() : float3xzysetter
public set xzy(float3 value) : voidxzzgetter
public get xzz() : float3xzwgetter
public get xzw() : float3xzwsetter
public set xzw(float3 value) : voidxwxgetter
public get xwx() : float3xwygetter
public get xwy() : float3xwysetter
public set xwy(float3 value) : voidxwzgetter
public get xwz() : float3xwzsetter
public set xwz(float3 value) : voidxwwgetter
public get xww() : float3yxxgetter
public get yxx() : float3yxygetter
public get yxy() : float3yxzgetter
public get yxz() : float3yxzsetter
public set yxz(float3 value) : voidyxwgetter
public get yxw() : float3yxwsetter
public set yxw(float3 value) : voidyyxgetter
public get yyx() : float3yyygetter
public get yyy() : float3yyzgetter
public get yyz() : float3yywgetter
public get yyw() : float3yzxgetter
public get yzx() : float3yzxsetter
public set yzx(float3 value) : voidyzygetter
public get yzy() : float3yzzgetter
public get yzz() : float3yzwgetter
public get yzw() : float3yzwsetter
public set yzw(float3 value) : voidywxgetter
public get ywx() : float3ywxsetter
public set ywx(float3 value) : voidywygetter
public get ywy() : float3ywzgetter
public get ywz() : float3ywzsetter
public set ywz(float3 value) : voidywwgetter
public get yww() : float3zxxgetter
public get zxx() : float3zxygetter
public get zxy() : float3zxysetter
public set zxy(float3 value) : voidzxzgetter
public get zxz() : float3zxwgetter
public get zxw() : float3zxwsetter
public set zxw(float3 value) : voidzyxgetter
public get zyx() : float3zyxsetter
public set zyx(float3 value) : voidzyygetter
public get zyy() : float3zyzgetter
public get zyz() : float3zywgetter
public get zyw() : float3zywsetter
public set zyw(float3 value) : voidzzxgetter
public get zzx() : float3zzygetter
public get zzy() : float3zzzgetter
public get zzz() : float3zzwgetter
public get zzw() : float3zwxgetter
public get zwx() : float3zwxsetter
public set zwx(float3 value) : voidzwygetter
public get zwy() : float3zwysetter
public set zwy(float3 value) : voidzwzgetter
public get zwz() : float3zwwgetter
public get zww() : float3wxxgetter
public get wxx() : float3wxygetter
public get wxy() : float3wxysetter
public set wxy(float3 value) : voidwxzgetter
public get wxz() : float3wxzsetter
public set wxz(float3 value) : voidwxwgetter
public get wxw() : float3wyxgetter
public get wyx() : float3wyxsetter
public set wyx(float3 value) : voidwyygetter
public get wyy() : float3wyzgetter
public get wyz() : float3wyzsetter
public set wyz(float3 value) : voidwywgetter
public get wyw() : float3wzxgetter
public get wzx() : float3wzxsetter
public set wzx(float3 value) : voidwzygetter
public get wzy() : float3wzysetter
public set wzy(float3 value) : voidwzzgetter
public get wzz() : float3wzwgetter
public get wzw() : float3wwxgetter
public get wwx() : float3wwygetter
public get wwy() : float3wwzgetter
public get wwz() : float3wwwgetter
public get www() : float3xxxxgetter
public get xxxx() : float4xxxygetter
public get xxxy() : float4xxxzgetter
public get xxxz() : float4xxxwgetter
public get xxxw() : float4xxyxgetter
public get xxyx() : float4xxyygetter
public get xxyy() : float4xxyzgetter
public get xxyz() : float4xxywgetter
public get xxyw() : float4xxzxgetter
public get xxzx() : float4xxzygetter
public get xxzy() : float4xxzzgetter
public get xxzz() : float4xxzwgetter
public get xxzw() : float4xxwxgetter
public get xxwx() : float4xxwygetter
public get xxwy() : float4xxwzgetter
public get xxwz() : float4xxwwgetter
public get xxww() : float4xyxxgetter
public get xyxx() : float4xyxygetter
public get xyxy() : float4xyxzgetter
public get xyxz() : float4xyxwgetter
public get xyxw() : float4xyyxgetter
public get xyyx() : float4xyyygetter
public get xyyy() : float4xyyzgetter
public get xyyz() : float4xyywgetter
public get xyyw() : float4xyzxgetter
public get xyzx() : float4xyzygetter
public get xyzy() : float4xyzzgetter
public get xyzz() : float4xyzwgetter
public get xyzw() : float4xyzwsetter
public set xyzw(float4 value) : voidxywxgetter
public get xywx() : float4xywygetter
public get xywy() : float4xywzgetter
public get xywz() : float4xywzsetter
public set xywz(float4 value) : voidxywwgetter
public get xyww() : float4xzxxgetter
public get xzxx() : float4xzxygetter
public get xzxy() : float4xzxzgetter
public get xzxz() : float4xzxwgetter
public get xzxw() : float4xzyxgetter
public get xzyx() : float4xzyygetter
public get xzyy() : float4xzyzgetter
public get xzyz() : float4xzywgetter
public get xzyw() : float4xzywsetter
public set xzyw(float4 value) : voidxzzxgetter
public get xzzx() : float4xzzygetter
public get xzzy() : float4xzzzgetter
public get xzzz() : float4xzzwgetter
public get xzzw() : float4xzwxgetter
public get xzwx() : float4xzwygetter
public get xzwy() : float4xzwysetter
public set xzwy(float4 value) : voidxzwzgetter
public get xzwz() : float4xzwwgetter
public get xzww() : float4xwxxgetter
public get xwxx() : float4xwxygetter
public get xwxy() : float4xwxzgetter
public get xwxz() : float4xwxwgetter
public get xwxw() : float4xwyxgetter
public get xwyx() : float4xwyygetter
public get xwyy() : float4xwyzgetter
public get xwyz() : float4xwyzsetter
public set xwyz(float4 value) : voidxwywgetter
public get xwyw() : float4xwzxgetter
public get xwzx() : float4xwzygetter
public get xwzy() : float4xwzysetter
public set xwzy(float4 value) : voidxwzzgetter
public get xwzz() : float4xwzwgetter
public get xwzw() : float4xwwxgetter
public get xwwx() : float4xwwygetter
public get xwwy() : float4xwwzgetter
public get xwwz() : float4xwwwgetter
public get xwww() : float4yxxxgetter
public get yxxx() : float4yxxygetter
public get yxxy() : float4yxxzgetter
public get yxxz() : float4yxxwgetter
public get yxxw() : float4yxyxgetter
public get yxyx() : float4yxyygetter
public get yxyy() : float4yxyzgetter
public get yxyz() : float4yxywgetter
public get yxyw() : float4yxzxgetter
public get yxzx() : float4yxzygetter
public get yxzy() : float4yxzzgetter
public get yxzz() : float4yxzwgetter
public get yxzw() : float4yxzwsetter
public set yxzw(float4 value) : voidyxwxgetter
public get yxwx() : float4yxwygetter
public get yxwy() : float4yxwzgetter
public get yxwz() : float4yxwzsetter
public set yxwz(float4 value) : voidyxwwgetter
public get yxww() : float4yyxxgetter
public get yyxx() : float4yyxygetter
public get yyxy() : float4yyxzgetter
public get yyxz() : float4yyxwgetter
public get yyxw() : float4yyyxgetter
public get yyyx() : float4yyyygetter
public get yyyy() : float4yyyzgetter
public get yyyz() : float4yyywgetter
public get yyyw() : float4yyzxgetter
public get yyzx() : float4yyzygetter
public get yyzy() : float4yyzzgetter
public get yyzz() : float4yyzwgetter
public get yyzw() : float4yywxgetter
public get yywx() : float4yywygetter
public get yywy() : float4yywzgetter
public get yywz() : float4yywwgetter
public get yyww() : float4yzxxgetter
public get yzxx() : float4yzxygetter
public get yzxy() : float4yzxzgetter
public get yzxz() : float4yzxwgetter
public get yzxw() : float4yzxwsetter
public set yzxw(float4 value) : voidyzyxgetter
public get yzyx() : float4yzyygetter
public get yzyy() : float4yzyzgetter
public get yzyz() : float4yzywgetter
public get yzyw() : float4yzzxgetter
public get yzzx() : float4yzzygetter
public get yzzy() : float4yzzzgetter
public get yzzz() : float4yzzwgetter
public get yzzw() : float4yzwxgetter
public get yzwx() : float4yzwxsetter
public set yzwx(float4 value) : voidyzwygetter
public get yzwy() : float4yzwzgetter
public get yzwz() : float4yzwwgetter
public get yzww() : float4ywxxgetter
public get ywxx() : float4ywxygetter
public get ywxy() : float4ywxzgetter
public get ywxz() : float4ywxzsetter
public set ywxz(float4 value) : voidywxwgetter
public get ywxw() : float4ywyxgetter
public get ywyx() : float4ywyygetter
public get ywyy() : float4ywyzgetter
public get ywyz() : float4ywywgetter
public get ywyw() : float4ywzxgetter
public get ywzx() : float4ywzxsetter
public set ywzx(float4 value) : voidywzygetter
public get ywzy() : float4ywzzgetter
public get ywzz() : float4ywzwgetter
public get ywzw() : float4ywwxgetter
public get ywwx() : float4ywwygetter
public get ywwy() : float4ywwzgetter
public get ywwz() : float4ywwwgetter
public get ywww() : float4zxxxgetter
public get zxxx() : float4zxxygetter
public get zxxy() : float4zxxzgetter
public get zxxz() : float4zxxwgetter
public get zxxw() : float4zxyxgetter
public get zxyx() : float4zxyygetter
public get zxyy() : float4zxyzgetter
public get zxyz() : float4zxywgetter
public get zxyw() : float4zxywsetter
public set zxyw(float4 value) : voidzxzxgetter
public get zxzx() : float4zxzygetter
public get zxzy() : float4zxzzgetter
public get zxzz() : float4zxzwgetter
public get zxzw() : float4zxwxgetter
public get zxwx() : float4zxwygetter
public get zxwy() : float4zxwysetter
public set zxwy(float4 value) : voidzxwzgetter
public get zxwz() : float4zxwwgetter
public get zxww() : float4zyxxgetter
public get zyxx() : float4zyxygetter
public get zyxy() : float4zyxzgetter
public get zyxz() : float4zyxwgetter
public get zyxw() : float4zyxwsetter
public set zyxw(float4 value) : voidzyyxgetter
public get zyyx() : float4zyyygetter
public get zyyy() : float4zyyzgetter
public get zyyz() : float4zyywgetter
public get zyyw() : float4zyzxgetter
public get zyzx() : float4zyzygetter
public get zyzy() : float4zyzzgetter
public get zyzz() : float4zyzwgetter
public get zyzw() : float4zywxgetter
public get zywx() : float4zywxsetter
public set zywx(float4 value) : voidzywygetter
public get zywy() : float4zywzgetter
public get zywz() : float4zywwgetter
public get zyww() : float4zzxxgetter
public get zzxx() : float4zzxygetter
public get zzxy() : float4zzxzgetter
public get zzxz() : float4zzxwgetter
public get zzxw() : float4zzyxgetter
public get zzyx() : float4zzyygetter
public get zzyy() : float4zzyzgetter
public get zzyz() : float4zzywgetter
public get zzyw() : float4zzzxgetter
public get zzzx() : float4zzzygetter
public get zzzy() : float4zzzzgetter
public get zzzz() : float4zzzwgetter
public get zzzw() : float4zzwxgetter
public get zzwx() : float4zzwygetter
public get zzwy() : float4zzwzgetter
public get zzwz() : float4zzwwgetter
public get zzww() : float4zwxxgetter
public get zwxx() : float4zwxygetter
public get zwxy() : float4zwxysetter
public set zwxy(float4 value) : voidzwxzgetter
public get zwxz() : float4zwxwgetter
public get zwxw() : float4zwyxgetter
public get zwyx() : float4zwyxsetter
public set zwyx(float4 value) : voidzwyygetter
public get zwyy() : float4zwyzgetter
public get zwyz() : float4zwywgetter
public get zwyw() : float4zwzxgetter
public get zwzx() : float4zwzygetter
public get zwzy() : float4zwzzgetter
public get zwzz() : float4zwzwgetter
public get zwzw() : float4zwwxgetter
public get zwwx() : float4zwwygetter
public get zwwy() : float4zwwzgetter
public get zwwz() : float4zwwwgetter
public get zwww() : float4wxxxgetter
public get wxxx() : float4wxxygetter
public get wxxy() : float4wxxzgetter
public get wxxz() : float4wxxwgetter
public get wxxw() : float4wxyxgetter
public get wxyx() : float4wxyygetter
public get wxyy() : float4wxyzgetter
public get wxyz() : float4wxyzsetter
public set wxyz(float4 value) : voidwxywgetter
public get wxyw() : float4wxzxgetter
public get wxzx() : float4wxzygetter
public get wxzy() : float4wxzysetter
public set wxzy(float4 value) : voidwxzzgetter
public get wxzz() : float4wxzwgetter
public get wxzw() : float4wxwxgetter
public get wxwx() : float4wxwygetter
public get wxwy() : float4wxwzgetter
public get wxwz() : float4wxwwgetter
public get wxww() : float4wyxxgetter
public get wyxx() : float4wyxygetter
public get wyxy() : float4wyxzgetter
public get wyxz() : float4wyxzsetter
public set wyxz(float4 value) : voidwyxwgetter
public get wyxw() : float4wyyxgetter
public get wyyx() : float4wyyygetter
public get wyyy() : float4wyyzgetter
public get wyyz() : float4wyywgetter
public get wyyw() : float4wyzxgetter
public get wyzx() : float4wyzxsetter
public set wyzx(float4 value) : voidwyzygetter
public get wyzy() : float4wyzzgetter
public get wyzz() : float4wyzwgetter
public get wyzw() : float4wywxgetter
public get wywx() : float4wywygetter
public get wywy() : float4wywzgetter
public get wywz() : float4wywwgetter
public get wyww() : float4wzxxgetter
public get wzxx() : float4wzxygetter
public get wzxy() : float4wzxysetter
public set wzxy(float4 value) : voidwzxzgetter
public get wzxz() : float4wzxwgetter
public get wzxw() : float4wzyxgetter
public get wzyx() : float4wzyxsetter
public set wzyx(float4 value) : voidwzyygetter
public get wzyy() : float4wzyzgetter
public get wzyz() : float4wzywgetter
public get wzyw() : float4wzzxgetter
public get wzzx() : float4wzzygetter
public get wzzy() : float4wzzzgetter
public get wzzz() : float4wzzwgetter
public get wzzw() : float4wzwxgetter
public get wzwx() : float4wzwygetter
public get wzwy() : float4wzwzgetter
public get wzwz() : float4wzwwgetter
public get wzww() : float4wwxxgetter
public get wwxx() : float4wwxygetter
public get wwxy() : float4wwxzgetter
public get wwxz() : float4wwxwgetter
public get wwxw() : float4wwyxgetter
public get wwyx() : float4wwyygetter
public get wwyy() : float4wwyzgetter
public get wwyz() : float4wwywgetter
public get wwyw() : float4wwzxgetter
public get wwzx() : float4wwzygetter
public get wwzy() : float4wwzzgetter
public get wwzz() : float4wwzwgetter
public get wwzw() : float4wwwxgetter
public get wwwx() : float4wwwygetter
public get wwwy() : float4wwwzgetter
public get wwwz() : float4wwwwgetter
public get wwww() : float4ToStringmethod
public fn ToString() : stringProvided by the compiler.
ToStringBuffermethod
public fn ToStringBuffer(StringBuilder builder) : int32Provided by the compiler.