21 #ifndef HX3D_MATH_VECTORUTILS 22 #define HX3D_MATH_VECTORUTILS 24 #include <glm/glm.hpp> 38 glm::vec3
rotate(glm::vec3 vector,
float angle, glm::vec3 axis);
48 glm::vec2
cross(glm::vec2 vec,
float v);
58 glm::vec2
cross(
float v, glm::vec2 vec);
68 float cross(glm::vec2 vec1, glm::vec2 vec2);
112 #include "hx3d/math/_inline/vector_utils.inl.hpp" bool epsEqual(T v1, T v2)
Test values equality with epsilon.
float squareLength(glm::vec2 vec)
Compute the square length of a 2D vector.
glm::vec3 rotate(glm::vec3 vector, float angle, glm::vec3 axis)
Rotate a vector of an angle on one/multiple axis.
float angleBetweenVecs(const glm::vec2 vec1, const glm::vec2 vec2)
Compute the angle between two 2D vectors.
glm::vec2 normalize(glm::vec2 vec)
Normalize a 2D vector.
glm::vec2 cross(glm::vec2 vec, float v)
Calculate the cross product vector between a 2D vector and a scalar.