Vector4¶
A 4D vector using floating point coordinates.
Description¶
A 4-element structure that can be used to represent 4D coordinates or any other quadruplet of numeric values.
It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike float which is always 64-bit. If double precision is needed, compile the engine with the option precision=double
.
See Vector4i for its integer counterpart.
Note: In a boolean context, a Vector4 will evaluate to false
if it's equal to Vector4(0, 0, 0, 0)
. Otherwise, a Vector4 will always evaluate to true
.
Properties¶
|
||
|
||
|
||
|
Constructors¶
Vector4 ( ) |
|
Methods¶
abs ( ) const |
|
ceil ( ) const |
|
cubic_interpolate ( Vector4 b, Vector4 pre_a, Vector4 post_b, float weight ) const |
|
cubic_interpolate_in_time ( Vector4 b, Vector4 pre_a, Vector4 post_b, float weight, float b_t, float pre_a_t, float post_b_t ) const |
|
direction_to ( Vector4 to ) const |
|
distance_squared_to ( Vector4 to ) const |
|
distance_to ( Vector4 to ) const |
|
floor ( ) const |
|
inverse ( ) const |
|
is_equal_approx ( Vector4 to ) const |
|
is_finite ( ) const |
|
is_normalized ( ) const |
|
is_zero_approx ( ) const |
|
length ( ) const |
|
length_squared ( ) const |
|
max_axis_index ( ) const |
|
min_axis_index ( ) const |
|
normalized ( ) const |
|