-
Notifications
You must be signed in to change notification settings - Fork 230
Vector4
Adrien GIVRY edited this page Sep 26, 2020
·
3 revisions
Mathematic representation of a 4D vector of floats
- C++ related class:
OvMaths::FVector4
Name | Type | Description |
---|---|---|
x | number |
X component of the Vector4 |
y | number |
Y component of the Vector4 |
z | number |
Z component of the Vector4 |
w | number |
W component of the Vector4 |
Name | Input | Output | Description |
---|---|---|---|
new | Vector4 |
Creates an instance of Vector4 with x, y, z and w equals to zero | |
new |
number : xnumber : ynumber : znumber : w |
Vector4 |
Creates an instance of Vector4 with the given values |
Name | Input | Output | Description |
---|---|---|---|
One | Vector4 |
Returns a (1,1,1,1) Vector4 | |
Zero | Vector4 |
Returns a (0,0,0,0) Vector4 | |
Length |
Vector4 : instance |
number |
Returns the length of the given Vector4 |
Dot |
Vector4 : aVector4 : b |
number |
Returns the dot product of the two given Vector4 |
Normalize |
Vector4 : instance |
Vector4 |
Returns the normalized version of the given Vector4 |
Lerp |
Vector4 : aVector4 : bnumber : t |
Vector4 |
Calculate the linear interpolation between two Vector4 using the given alpha |
Operation | Description |
---|---|
Vector4 + Vector4 |
Adds two Vector4 |
Vector4 - Vector4 |
Substracts two Vector4 |
-Vector4 |
Multiplies each component of a Vector4 by -1 |
Vector4 * number |
Multiplies each component of a Vector4 by a number |
Vector4 / number |
Divides each component of a Vector4 by a number |
to_string(Vector4) |
Converts a Vector4 to a string |