6TEST_CASE(
"Vec Size Tests",
"[math_vectors_test]" )
84TEST_CASE(
"Vec Constructor Conversions",
"[math_vectors_test]" )
94TEST_CASE(
"Vec Length Tests",
"[math_vectors_test]" )
109 input1.
set(2.0f, 3.0f);
112 input2.
set(4.0f, 3.0f, 2.0f);
113 input3.
set(4.0f, 3.0f, 2.0f, 0.0f);
117TEST_CASE(
"Vec-Scalar Multiply Tests",
"[math_vectors_test]" )
120 const vec3<F32> input2(5.0f, 0.0f, -5.0f);
124 const vec3<F32> result2(2.5f, 0.0f, -2.5f);
132TEST_CASE(
"Vec-Vec Multiply Tests",
"[math_vectors_test]" )
142 const vec2<U32> result1((2u * 4u), (2u * 4u));
143 const vec3<I32> result2((5 * 2), (0 * 3), (-5 * -1));
144 const vec4<F32> result3((10.0f * 1.0f), (10.0f * 1.0f), (10.0f * 1.0f), (10.0f * 1.0f));
163 CHECK_TRUE(
COMPARE(input3.
dot(input6), (10.0f * 1.0f) + (10.0f * 1.0f) + (10.0f * 1.0f) + (10.0f * 1.0f)));
void set(const T *v) noexcept
set the 2 components of the vector manually using a source pointer to a (large enough) array
T length() const noexcept
return the vector's length
T dot(const vec2 &v) const noexcept
calculate the dot product between this vector and the specified one
T dot(const vec3 &v) const noexcept
calculate the dot product between this vector and the specified one
T length() const noexcept
return the vector's length
T lengthSquared() const noexcept
return the squared distance of the vector
void set(const T *v) noexcept
set the 3 components of the vector manually using a source pointer to a (large enough) array
void set(const T *v) noexcept
set the 4 components of the vector manually using a source pointer to a (large enough) array
T length() const noexcept
return the vector's length
T dot(const vec4 &v) const noexcept
calculate the dot product between this vector and the specified one
Handle console commands that start with a forward slash.
bool COMPARE(T X, U Y) noexcept
TEST_CASE("ByteBuffer RW Bool", "[byte_buffer]")
#define CHECK_NOT_ZERO(X)
#define CHECK_EQUAL(LHS, RHS)