vec4
library
Functions
-
add(List<double> out, List<double> a, List<double> b)
→ List<double>
-
Adds two vec4's
-
ceil(List<double> out, List<double> a)
→ List<double>
-
math.ceil the components of a vec4
-
clone(dynamic a)
→ List<double>
-
Creates a new vec4 initialized with values from an existing vector
-
copy(List<double> out, List<double> a)
→ List<double>
-
Copy the values from one vec4 to another
-
create()
→ List<double>
-
Creates a new, empty vec4
-
cross(List<double> out, List<double> u, List<double> v, List<double> w)
→ List<double>
-
Returns the cross-product of three vectors in a 4-dimensional space
-
distance(List<double> a, List<double> b)
→ double
-
Calculates the euclidian distance between two vec4's
-
divide(List<double> out, List<double> a, List<double> b)
→ List<double>
-
Divides two vec4's
-
dot(dynamic a, dynamic b)
→ List<double>
-
Calculates the dot product of two vec4's
-
equals(List<double> a, List<double> b)
→ bool
-
Returns whether or not the vectors have approximately the same elements in the same position.
-
exactEquals(List<double> a, List<double> b)
→ bool
-
Returns whether or not the vectors have exactly the same elements in the same position (when compared with ==)
-
floor(List<double> out, List<double> a)
→ List<double>
-
math.floor the components of a vec4
-
fromValues(double x, double y, double z, double w)
→ List<double>
-
Creates a new vec4 initialized with the given values
-
inverse(List<double> out, List<double> a)
→ List<double>
-
Returns the inverse of the components of a vec4
-
length(List<double> a)
→ double
-
Calculates the length of a vec4
-
lerp(List<double> out, List<double> a, List<double> b, double t)
→ List<double>
-
Performs a linear interpolation between two vec4's
-
max(List<double> out, List<double> a, List<double> b)
→ List<double>
-
Returns the maximum of two vec4's
-
min(List<double> out, List<double> a, List<double> b)
→ List<double>
-
Returns the minimum of two vec4's
-
multiply(List<double> out, List<double> a, List<double> b)
→ List<double>
-
Multiplies two vec4's
-
negate(List<double> out, List<double> a)
→ List<double>
-
Negates the components of a vec4
-
normalize(List<double> out, List<double> a)
→ List<double>
-
Normalize a vec4
-
random(List<double> out, double? scale)
→ List<double>
-
Generates a random vector with the given scale
-
round(List<double> out, List<double> a)
→ List<double>
-
math.round the components of a vec4
-
scale(List<double> out, List<double> a, double b)
→ List<double>
-
Scales a vec4 by a scalar number
-
scaleAndAdd(List<double> out, List<double> a, List<double> b, double scale)
→ List<double>
-
Adds two vec4's after scaling the second operand by a scalar value
-
set(List<double> out, double x, double y, double z, double w)
→ List<double>
-
Set the components of a vec4 to the given values
-
squaredDistance(List<double> a, List<double> b)
→ double
-
Calculates the squared euclidian distance between two vec4's
-
squaredLength(List<double> a)
→ double
-
Calculates the squared length of a vec4
-
str(List<double> a)
→ String
-
Returns a string representation of a vector
-
subtract(List<double> out, List<double> a, List<double> b)
→ List<double>
-
Subtracts vector b from vector a
-
transformMat4(List<double> out, List<double> a, List<double> m)
→ List<double>
-
Transforms the vec4 with a mat4.
-
transformQuat(List<double> out, List<double> a, List<double> q)
→ List<double>
-
Transforms the vec4 with a quat
-
zero(List<double> out)
→ List<double>
-
Set the components of a vec4 to zero