![]() |
SH4ZAM! 0.9.1
Fast math library for the Sega Dreamcast's SH4 CPU
|
#include <math.h>#include <float.h>#include "shz_scalar.h"#include "shz_trig.h"#include "inline/shz_vector.inl.h"

Go to the source code of this file.
Data Structures | |
| struct | shz_vec2_t |
| struct | shz_vec3_t |
| struct | shz_vec4_t |
Macros | |
Adapters | |
Macros for converting between SH4ZAM and other compatible formats. | |
| #define | shz_vec2_deref(ptr) |
| #define | shz_vec3_deref(ptr) |
| #define | shz_vec4_deref(ptr) |
| #define | shz_vec2_from(value) |
| #define | shz_vec3_from(value) |
| #define | shz_vec4_from(value) |
| #define | shz_vec2_to(type, vector) |
| #define | shz_vec3_to(type, vector) |
| #define | shz_vec4_to(type, vector) |
Type-Generic Routines | |
Generalized vector routines for C and C++. | |
| #define | shz_vec_abs(vec) |
| #define | shz_vec_neg(vec) |
| #define | shz_vec_inv(vec) |
| #define | shz_vec_max(vec) |
| #define | shz_vec_min(vec) |
| #define | shz_vec_clamp(vec, min, max) |
| #define | shz_vec_equal(vec1, vec2) |
| #define | shz_vec_add(vec1, vec2) |
| #define | shz_vec_sub(vec1, vec2) |
| #define | shz_vec_mul(vec1, vec2) |
| #define | shz_vec_div(vec1, vec2) |
| #define | shz_vec_scale(vec, factor) |
| #define | shz_vec_dot(vec1, vec2) |
| #define | shz_vec_dot2(l, r1, r2) |
| #define | shz_vec_dot3(l, r1, r2, r3) |
| #define | shz_vec_magnitude_sqr(vec) |
| #define | shz_vec_magnitude(vec) |
| #define | shz_vec_magnitude_inv(vec) |
| #define | shz_vec_normalize(vec) |
| #define | shz_vec_normalize_safe(vec) |
| #define | shz_vec_distance(vec1, vec2) |
| #define | shz_vec_move(vec, target, maxdist) |
| #define | shz_vec_distance_sqr(vec1, vec2) |
| #define | shz_vec_lerp(vec1, vec2, t) |
| #define | shz_vec_reflect(incidence, normal) |
| #define | shz_vec_refract(incidence, normal, eta) |
| #define | shz_vec_cross(vec1, vec2) |
| #define | shz_vec_project(vec1, vec2) |
| #define | shz_vec_project_safe(vec1, vec2) |
| #define | shz_vec_angles(vec) |
| #define | shz_vec_angle_between(vec1, vec2) |
| #define | shz_vec_swizzle(vec, ...) |
| #define | shz_vec_floor(vec) |
| #define | shz_vec_ceil(vec) |
| #define | shz_vec_round(vec) |
| #define | shz_vec_fract(vec) |
| #define | shz_vec_sign(vec) |
| #define | shz_vec_saturate(vec) |
| #define | shz_vec_minv(a, b) |
| #define | shz_vec_maxv(a, b) |
| #define | shz_vec_inv_sqrtf(vec) |
| #define | shz_vec_sqrtf(vec) |
| #define | shz_vec_stepv(vec, edge) |
| #define | shz_vec_step(vec, edge) |
| #define | shz_vec_smoothstepv(vec, edge0, edge1) |
| #define | shz_vec_smoothstep(vec, edge0, edge1) |
| #define | shz_vec_smoothstepv_safe(vec, edge0, edge1) |
| #define | shz_vec_smoothstep_safe(vec, edge0, edge1) |
Typedefs | |
| typedef shz_vec2_t | shz_vec2 |
| typedef shz_vec3_t | shz_vec3 |
| typedef shz_vec4_t | shz_vec4 |
Vector types and operations.
This file provides types and mathematical routines for representing and operating on vectors.
Definition in file shz_vector.h.
| #define shz_vec2_deref | ( | ptr | ) |
Dereferences the given pointer to a sequence of 2 floats as a shz_vec2_t.
Definition at line 725 of file shz_vector.h.
| #define shz_vec3_deref | ( | ptr | ) |
Dereferences the given pointer to a sequence of 3 floats as a shz_vec3_t.
Definition at line 728 of file shz_vector.h.
| #define shz_vec4_deref | ( | ptr | ) |
Dereferences the given pointer to a sequence of 4 floats as a shz_vec4_t.
Definition at line 731 of file shz_vector.h.
| #define shz_vec2_from | ( | value | ) |
Converts the given value or expression to the equivalent 2D SH4ZAM vector value.
Definition at line 734 of file shz_vector.h.
| #define shz_vec3_from | ( | value | ) |
Converts the given value or expression to the equivalent 3D SH4ZAM vector value.
Definition at line 737 of file shz_vector.h.
| #define shz_vec4_from | ( | value | ) |
Converts the given value or expression to the equivalent 4D SH4ZAM vector value.
Definition at line 740 of file shz_vector.h.
| #define shz_vec2_to | ( | type, | |
| vector ) |
Converts the given 2D vector into a value of the given type.
Definition at line 743 of file shz_vector.h.
| #define shz_vec3_to | ( | type, | |
| vector ) |
Converts the given 3D vector into a value of the given type.
Definition at line 746 of file shz_vector.h.
| #define shz_vec4_to | ( | type, | |
| vector ) |
Converts the given 4D vector into a value of the given type.
Definition at line 749 of file shz_vector.h.
| #define shz_vec_abs | ( | vec | ) |
C type-generic vector absolute value.
Definition at line 761 of file shz_vector.h.
| #define shz_vec_neg | ( | vec | ) |
C type-generic vector negation.
Definition at line 768 of file shz_vector.h.
| #define shz_vec_inv | ( | vec | ) |
C type-generic vector inversion.
Definition at line 775 of file shz_vector.h.
| #define shz_vec_max | ( | vec | ) |
C type-generic vector maximum value.
Definition at line 782 of file shz_vector.h.
| #define shz_vec_min | ( | vec | ) |
C type-generic vector minimum value.
Definition at line 789 of file shz_vector.h.
| #define shz_vec_clamp | ( | vec, | |
| min, | |||
| max ) |
C type-generic vector minimum value.
Definition at line 796 of file shz_vector.h.
| #define shz_vec_equal | ( | vec1, | |
| vec2 ) |
C type-generic vector equals.
Definition at line 803 of file shz_vector.h.
| #define shz_vec_add | ( | vec1, | |
| vec2 ) |
C type-generic vector addition.
Definition at line 810 of file shz_vector.h.
| #define shz_vec_sub | ( | vec1, | |
| vec2 ) |
C type-generic vector subtraction.
Definition at line 817 of file shz_vector.h.
| #define shz_vec_mul | ( | vec1, | |
| vec2 ) |
C type-generic vector multiplication.
Definition at line 824 of file shz_vector.h.
| #define shz_vec_div | ( | vec1, | |
| vec2 ) |
C type-generic vector division.
Definition at line 831 of file shz_vector.h.
| #define shz_vec_scale | ( | vec, | |
| factor ) |
C type-generic vector scaling.
Definition at line 838 of file shz_vector.h.
| #define shz_vec_dot | ( | vec1, | |
| vec2 ) |
C type-generic vector dot product.
Definition at line 845 of file shz_vector.h.
| #define shz_vec_dot2 | ( | l, | |
| r1, | |||
| r2 ) |
C type-generic vector chained double dot product.
Definition at line 852 of file shz_vector.h.
| #define shz_vec_dot3 | ( | l, | |
| r1, | |||
| r2, | |||
| r3 ) |
C type-generic vector chained triple dot product.
Definition at line 859 of file shz_vector.h.
| #define shz_vec_magnitude_sqr | ( | vec | ) |
C type-generic vector squared magnitude.
Definition at line 866 of file shz_vector.h.
| #define shz_vec_magnitude | ( | vec | ) |
C type-generic vector magnitude.
Definition at line 873 of file shz_vector.h.
| #define shz_vec_magnitude_inv | ( | vec | ) |
C type-generic vector inverse magnitude.
Definition at line 880 of file shz_vector.h.
| #define shz_vec_normalize | ( | vec | ) |
C type-generic vector normalization.
Definition at line 887 of file shz_vector.h.
| #define shz_vec_normalize_safe | ( | vec | ) |
C type-generic safe vector normalization.
Definition at line 894 of file shz_vector.h.
| #define shz_vec_distance | ( | vec1, | |
| vec2 ) |
C type-generic vector distance.
Definition at line 901 of file shz_vector.h.
| #define shz_vec_move | ( | vec, | |
| target, | |||
| maxdist ) |
C type-generic vector move.
Definition at line 908 of file shz_vector.h.
| #define shz_vec_distance_sqr | ( | vec1, | |
| vec2 ) |
C type-generic vector squared distance.
Definition at line 915 of file shz_vector.h.
| #define shz_vec_lerp | ( | vec1, | |
| vec2, | |||
| t ) |
C type-generic linear interpolation between two vectors.
Definition at line 922 of file shz_vector.h.
| #define shz_vec_reflect | ( | incidence, | |
| normal ) |
C type-generic vector reflection.
Definition at line 929 of file shz_vector.h.
| #define shz_vec_refract | ( | incidence, | |
| normal, | |||
| eta ) |
C type-generic vector refraction.
Definition at line 936 of file shz_vector.h.
| #define shz_vec_cross | ( | vec1, | |
| vec2 ) |
C type-generic vector cross-product.
Definition at line 943 of file shz_vector.h.
| #define shz_vec_project | ( | vec1, | |
| vec2 ) |
C type-generic vector projection.
Definition at line 949 of file shz_vector.h.
| #define shz_vec_project_safe | ( | vec1, | |
| vec2 ) |
C type-generic safe vector projection.
Definition at line 956 of file shz_vector.h.
| #define shz_vec_angles | ( | vec | ) |
C type-generic angle-from-vector extraction.
Definition at line 963 of file shz_vector.h.
| #define shz_vec_angle_between | ( | vec1, | |
| vec2 ) |
C type-generic angle between two vectors.
Definition at line 969 of file shz_vector.h.
| #define shz_vec_swizzle | ( | vec, | |
| ... ) |
C type-generic vector swizzling.
Definition at line 975 of file shz_vector.h.
| #define shz_vec_floor | ( | vec | ) |
C type-generic component-wise floor.
Definition at line 982 of file shz_vector.h.
| #define shz_vec_ceil | ( | vec | ) |
C type-generic component-wise ceil.
Definition at line 989 of file shz_vector.h.
| #define shz_vec_round | ( | vec | ) |
C type-generic component-wise round.
Definition at line 996 of file shz_vector.h.
| #define shz_vec_fract | ( | vec | ) |
C type-generic component-wise fract.
Definition at line 1003 of file shz_vector.h.
| #define shz_vec_sign | ( | vec | ) |
C type-generic component-wise sign.
Definition at line 1010 of file shz_vector.h.
| #define shz_vec_saturate | ( | vec | ) |
C type-generic component-wise saturate.
Definition at line 1017 of file shz_vector.h.
| #define shz_vec_minv | ( | a, | |
| b ) |
C type-generic pairwise minimum.
Definition at line 1024 of file shz_vector.h.
| #define shz_vec_maxv | ( | a, | |
| b ) |
C type-generic pairwise maximum.
Definition at line 1031 of file shz_vector.h.
| #define shz_vec_inv_sqrtf | ( | vec | ) |
C type-generic inv_sqrtf.
Definition at line 1038 of file shz_vector.h.
| #define shz_vec_sqrtf | ( | vec | ) |
C type-generic sqrtf.
Definition at line 1045 of file shz_vector.h.
| #define shz_vec_stepv | ( | vec, | |
| edge ) |
C type-generic component-wise step.
Definition at line 1052 of file shz_vector.h.
| #define shz_vec_step | ( | vec, | |
| edge ) |
C type-generic step.
Definition at line 1059 of file shz_vector.h.
| #define shz_vec_smoothstepv | ( | vec, | |
| edge0, | |||
| edge1 ) |
C type-generic component-wise smoothstep.
Definition at line 1066 of file shz_vector.h.
| #define shz_vec_smoothstep | ( | vec, | |
| edge0, | |||
| edge1 ) |
C type-generic smoothstep.
Definition at line 1073 of file shz_vector.h.
| #define shz_vec_smoothstepv_safe | ( | vec, | |
| edge0, | |||
| edge1 ) |
C type-generic component-wise smoothstep_safe.
Definition at line 1080 of file shz_vector.h.
| #define shz_vec_smoothstep_safe | ( | vec, | |
| edge0, | |||
| edge1 ) |
C type-generic smoothstep_safe.
Definition at line 1087 of file shz_vector.h.
| typedef shz_vec2_t shz_vec2 |
Alternate typedef for the shz_vec2 struct for those who hate POSIX-style.
Definition at line 49 of file shz_vector.h.
| typedef shz_vec3_t shz_vec3 |
Alternate typedef for the shz_vec3 struct for those who hate POSIX-style.
Definition at line 74 of file shz_vector.h.
| typedef shz_vec4_t shz_vec4 |
Alternate typedef for the shz_vec4 struct for those who hate POSIX-style.
Definition at line 105 of file shz_vector.h.
|
noexcept |
Returns a 2D vector with the given x, and y coordinates.
|
noexcept |
Returns a 3D vector with the given x, y, and z coordinates.
|
noexcept |
Returns a 4D vector with the given x, y, z, and w coordinates.
|
noexcept |
Returns a 2D vector with the value of each component equal to v.
|
noexcept |
Returns a 3D vector with the value of each compoonent equal to v.
|
noexcept |
Returns a 4D vector with the value of each component equal to v.
|
noexcept |
Returns a 2D vector whose components are the absolute values of the given vector's components.
|
noexcept |
Returns a 3D vector whose components are the absolute values of the given vector's components.
|
noexcept |
Returns a 4D vector whose components are the absolute values of the given vector's components.
|
noexcept |
Returns a 2D vector whose components are the negative values of the given vector's components.
|
noexcept |
Returns a 3D vector whose components are the negative values of the given vector's components.
|
noexcept |
Returns a 4D vector whose components are the negative values of the given vector's components.
|
noexcept |
Returns the 2D vector whose components have been inverted or reciprocated.
|
noexcept |
Returns the 3D vector whose components have been inverted or reciprocated.
|
noexcept |
Returns the 4D vector whose components have been inverted or reciprocated.
|
noexcept |
Returns the maximum value of both of the given vector's components.
|
noexcept |
Returns the maximum value of the given vector's 3 components.
|
noexcept |
Returns the maximum value of the given vector's 4 componetns.
|
noexcept |
Retuns the minimum value of both of the given vector's components.
|
noexcept |
Returns the minimum value of the given vector's 3 components.
|
noexcept |
Returns the minimum value of the given vector's 4 components.
|
noexcept |
Clamps the values of the given 2D vec between min and max, returning a new vector.
|
noexcept |
Clamps the values of the given 3D vec between min and max, returning a new vector.
|
noexcept |
Clamps the values of the given 4D vec between min and max, returning a new vector.
|
noexcept |
Returns a 2D vector whose components are the floor of the given vector's components.
|
noexcept |
Returns a 3D vector whose components are the floor of the given vector's components.
|
noexcept |
Returns a 4D vector whose components are the floor of the given vector's components.
|
noexcept |
Returns a 2D vector whose components are the ceil of the given vector's components.
|
noexcept |
Returns a 3D vector whose components are the ceil of the given vector's components.
|
noexcept |
Returns a 4D vector whose components are the ceil of the given vector's components.
|
noexcept |
Returns a 2D vector whose components are the rounded values of the given vector's components.
|
noexcept |
Returns a 3D vector whose components are the rounded values of the given vector's components.
|
noexcept |
Returns a 4D vector whose components are the rounded values of the given vector's components.
|
noexcept |
Returns a 2D vector whose components are the fractional parts of the given vector's components.
|
noexcept |
Returns a 3D vector whose components are the fractional parts of the given vector's components.
|
noexcept |
Returns a 4D vector whose components are the fractional parts of the given vector's components.
|
noexcept |
Returns a 2D vector whose components are the signs (-1, 0, or 1) of the given vector's components.
|
noexcept |
Returns a 3D vector whose components are the signs (-1, 0, or 1) of the given vector's components.
|
noexcept |
Returns a 4D vector whose components are the signs (-1, 0, or 1) of the given vector's components.
|
noexcept |
Returns a 2D vector whose components are saturated (clamped to [0, 1]) values of the given vector's components.
|
noexcept |
Returns a 3D vector whose components are saturated (clamped to [0, 1]) values of the given vector's components.
|
noexcept |
Returns a 4D vector whose components are saturated (clamped to [0, 1]) values of the given vector's components.
|
noexcept |
Returns a 2D vector whose components are the pairwise minimums of the two given vectors' components.
|
noexcept |
Returns a 3D vector whose components are the pairwise minimums of the two given vectors' components.
|
noexcept |
Returns a 4D vector whose components are the pairwise minimums of the two given vectors' components.
|
noexcept |
Returns a 2D vector whose components are the pairwise maximums of the two given vectors' components.
|
noexcept |
Returns a 3D vector whose components are the pairwise maximums of the two given vectors' components.
|
noexcept |
Returns a 4D vector whose components are the pairwise maximums of the two given vectors' components.
|
noexcept |
Returns true if the values of each element within the two 2D vectors are approximately equal based on relative or absolute tolerance.
|
noexcept |
Returns true if the values of each element within the two 3D vectors are approximately equal based on relative or absolute tolerance.
|
noexcept |
Returns true if the values of each element within the two 4D vectors are approximately equal based on relative or absolute tolerance.
|
noexcept |
For each component: returns 0.0f if vec[i] < edge[i], otherwise 1.0f.
|
noexcept |
For each component: returns 0.0f if vec[i] < edge[i], otherwise 1.0f.
|
noexcept |
For each component: returns 0.0f if vec[i] < edge[i], otherwise 1.0f.
|
noexcept |
For each component: returns 0.0f if vec[i] < edge, otherwise 1.0f.
|
noexcept |
For each component: returns 0.0f if vec[i] < edge, otherwise 1.0f.
|
noexcept |
For each component: returns 0.0f if vec[i] < edge, otherwise 1.0f.
|
noexcept |
For each component: returns 0.0f at/below edge0, 1.0f at/above edge1, smoothly varying in-between.
|
noexcept |
For each component: returns 0.0f at/below edge0, 1.0f at/above edge1, smoothly varying in-between.
|
noexcept |
For each component: returns 0.0f at/below edge0, 1.0f at/above edge1, smoothly varying in-between.
|
noexcept |
For each component: returns 0.0f at/below edge0[i], 1.0f at/above edge1[i], smoothly varying in-between.
|
noexcept |
For each component i: returns 0.0f at/below edge0[i], 1.0f at/above edge1[i], smoothly varying in-between.
|
noexcept |
For each component i: returns 0.0f at/below edge0[i], 1.0f at/above edge1[i], smoothly varying in-between.
|
noexcept |
For each component: returns 0.0f at/below edge0, 1.0f at/above edge1, smoothly varying in-between. Accepts inverse edges.
|
noexcept |
For each component: returns 0.0f at/below edge0, 1.0f at/above edge1, smoothly varying in-between. Accepts inverse edges.
|
noexcept |
For each component: returns 0.0f at/below edge0, 1.0f at/above edge1, smoothly varying in-between. Accepts inverse edges.
|
noexcept |
For each component: returns 0.0f at/below edge0[i], 1.0f at/above edge1[i], smoothly varying in-between. Accepts inverse edges.
|
noexcept |
For each component i: returns 0.0f at/below edge0[i], 1.0f at/above edge1[i], smoothly varying in-between. Accepts inverse edges.
|
noexcept |
For each component i: returns 0.0f at/below edge0[i], 1.0f at/above edge1[i], smoothly varying in-between. Accepts inverse edges.
|
noexcept |
Returns a 2D vector whose components are the inverse square root of the given vector's components.
|
noexcept |
Returns a 3D vector whose components are the inverse square root of the given vector's components.
|
noexcept |
Returns a 4D vector whose components are the inverse square root of the given vector's components.
|
noexcept |
Returns a 2D vector whose components are the square root of the given vector's components.
|
noexcept |
Returns a 3D vector whose components are the square root of the given vector's components.
|
noexcept |
Returns a 4D vector whose components are the square root of the given vector's components.
|
noexcept |
Returns a 2D vector whose components are the sums of the given vectors' components.
|
noexcept |
Returns a 3D vector whose components are the sums of the given vectors' components.
|
noexcept |
Returns a 4D vector whose components are the sums of the given vectors' components.
|
noexcept |
Returns a 2D vector whose components are equal to the values of vec1 minus vec2.
|
noexcept |
Returns a 3D vector whose components are equal to the values of vec1 minus vec2.
|
noexcept |
Returns a 4D vector whose components are equal to the values of vec1 minus vec2.
|
noexcept |
Returns a 2D vector whose component values are those of vec1 times vec2.
|
noexcept |
Returns a 3D vector whose component values are those of vec1 times vec2.
|
noexcept |
Returns a 4D vector whose component values are those of vec1 times vec2.
|
noexcept |
Returns a 2D vector whose component values are those of vec1 divided by vec2.
|
noexcept |
Returns a 3D vector whose component values are those of vec1 divided by vec2.
|
noexcept |
Returns a 4D vector whose component values are those of vec1 divided by vec2.
|
noexcept |
Returns a 2D vector whose component values are those of the given vector multiplied by a factor.
|
noexcept |
Returns a 3D vector whose component values are those of the given vector multiplied by a factor.
|
noexcept |
Returns a 4D vector whose component values are those of the given vector multiplied by a factor.
|
noexcept |
Returns the squared magnitude of the given 2D vector.
|
noexcept |
Returns the squared magnitude of the given 4D vector.
|
noexcept |
Returns the squared magnitude of the given 3D vector.
|
noexcept |
Returns the magnitude of the given 2D vector.
|
noexcept |
Returns the magnitude of the given 3D vector.
|
noexcept |
Returns the magnitude of the given 4D vector.
|
noexcept |
Returns the inverse magnitude of the given 2D vector.
|
noexcept |
Returns the inverse magnitude of the given 3D vector.
|
noexcept |
Returns the inverse magnitude of the given 4D vector.
|
noexcept |
Returns a normalized unit vector from the given 2D vector.
|
noexcept |
Returns a normalized unit vector from the given 3D vector.
|
noexcept |
Returns a normalized unit vector from the given 4D vector.
|
noexcept |
SAFELY returns a normalized unit vector from the given 2D vector.
If the vector's magnitude is not > 0.0f, safely returns a zero vector.
|
noexcept |
SAFELY returns a normalized unit vector from the given 3D vector.
If the vector's magnitude is not > 0.0f, safely returns a zero vector.
|
noexcept |
SAFELY returns a normalized unit vector from the given 4D vector.
If the vector's magnitude is not > 0.0f, safely returns a zero vector.
|
noexcept |
Returns the dot product between the two given 2D vectors.
|
noexcept |
Returns the two dot products taken between the 2D vector l and 2D vectors r1 and r2.
|
noexcept |
Returns the three dot products taken between the 2D vector l and 2D vectors r1, r2, and r3.
|
noexcept |
Returns the dot product between the two given 3D vectors.
|
noexcept |
Returns the two dot products taken between the 3D vector l and 3D vectors r1 and r2.
|
noexcept |
Returns the three dot products taken between the 3D vector l and 3D vectors r1, r2, and r3.
|
noexcept |
Returns the dot product between the two given 4D vectors.
|
noexcept |
Returns the two dot products taken between the 4D vector l and 4D vectors r1 and r2.
|
noexcept |
Returns the three dot products taken between the 4D vector l and 4D vectors r1, r2, and r3.
|
noexcept |
Returns the distance between the two given 2D vectors.
|
noexcept |
Returns the distance between the two given 3D vectors.
|
noexcept |
Returns the distance between the two given 4D vectors.
|
noexcept |
Returns the squared-distance between the two given 2D vectors.
|
noexcept |
Returns the squared-distance between the two given 3D vectors.
|
noexcept |
Returns the squared-distance between the two given 4D vectors.
|
noexcept |
Returns the given 2D vector, translated towards the target by the given max_distance.
|
noexcept |
Returns the given 3D vector, translated towards the target by the given max_distance.
|
noexcept |
Returns the given 4D vector, translated towards the target by the given max_distance.
|
noexcept |
Returns a 2D vector that is linearly interpolated from a to b by the given 0.0f-1.0f factor, t.
|
noexcept |
Returns a 3D vector that is linearly interpolated from a to b by the given 0.0f-1.0f factor, t.
|
noexcept |
Returns a 4D vector that is linearly interpolated from a to b by the given 0.0f-1.0f factor, t.
|
noexcept |
Reflects the given 2D incidence vector against a surface with the given normal, returning the result.
|
noexcept |
Reflects the given 3D incidence vector against a surface with the given normal, returning the result.
|
noexcept |
Reflects the given 4D incidence vector against a surface with the given normal, returning the result.
|
noexcept |
Refracts the given 2D incidence vector against a surface with the given normal using the given refraction index ratio, eta.
|
noexcept |
Refracts the given 3D incidence vector against a surface with the given normal using the given refraction index ratio, eta.
|
noexcept |
Refracts the given 4D incidence vector against a surface with the given normal using the given refraction index ratio, eta.
|
noexcept |
Returns the cross product, as a scalar, between two 2D vectors.
|
noexcept |
Returns the vector produced by taking the cross-product of the two given 3D vectors.
|
noexcept |
Returns the resulting vector from projecting the given 2D vector along the given (unit) axis.
|
noexcept |
Returns the resulting vector from projecting the given 3D vector along the given (unit) axis.
|
noexcept |
Returns the resulting vector from projecting the given 4D vector along the given (unit) axis.
|
noexcept |
Returns the resulting vector from projecting the given 2D vector along the given (unit) axis.
vec has a magnitude of 0.0f.
|
noexcept |
Returns the resulting vector from projecting the given 3D vector along the given (unit) axis.
vec has a magnitude of 0.0f.
|
noexcept |
Returns the resulting vector from projecting the given 4D vector along the given (unit) axis.
vec has a magnitude of 0.0f.
|
noexcept |
Returns the rejection of the given vector, vec, onto another vector, onto.
|
noexcept |
Returns the 3D vector "triple product" between vector's a, b, and c.
|
noexcept |
Returns a vector which is perpendicular to the given vector.
|
noexcept |
Computes barycentric coordinates <u, v, w> for point p, within the plane of the triangle with vertices a, b, and c.
|
noexcept |
Returns 2 3D vectors which are normalized and orthogonal to the two input vectors.
|
noexcept |
Calculates the cubic hermite interpolation between two vectors and their tangents.
|
noexcept |
Returns the angle formed between the given 2D vectors in radians.
|
noexcept |
Returns the angle formed between the given 3D vectors in radians.
|
noexcept |
Returns the angle formed between the positive X axis and the given 2D vector, in radians.
|
noexcept |
Returns the angles formed between the positive X axis and the given 3D vector, in radians.
|
noexcept |
Returns the 2D unit vector representing a rotation from the positive X axis.
|
noexcept |
Returns the 3D unit vector representing the given rotation angles relative to the positive X axis.
|
noexcept |
Returns the 2D unit vector representing a rotation from the positive X axis in radians.
|
noexcept |
Returns the 3D unit vector representing the given rotation angles relative to the positive X axis in radians.
|
noexcept |
Returns the 2D unit vector representing a rotation from the positive X axis in degrees.
|
noexcept |
Returns the 3D unit vector representing the given rotation angles relative to the positive X axis in degrees.
|
noexcept |
Rotates the given 2D vector about the Z axis by the given angle in radians.
|
noexcept |
Rotates the given 3D vector about the X axis by the given angle in radians.
|
noexcept |
Rotates the given 3D vector about the Y axis by the given angle in radians.
|
noexcept |
Rotates the given 3D vector about the Z axis by the given angle in radians.
|
noexcept |
Extends a 2D vector to 3D, using z as the value of the Z component.
|
noexcept |
Extends a 2D vector to 4D, using z and w as the values of the Z and W components.
|
noexcept |
Extends a 3D vector to 4D, using w as the value of the W component.
|
noexcept |
Returns a 2D vector whose elements are equal to the source vector's values at the given indices.
|
noexcept |
Returns a 3D vector whose elements are equal to the source vector's values at the given indices.
|
noexcept |
Returns a new 2D vector whose elements are equal to the source vector's values at the given indices.