vec4: optimize vec4 norm and norm2

This commit is contained in:
Recep Aslantas
2018-04-13 11:18:42 +03:00
parent 0eb37da8bb
commit 79f8b1ebf8
4 changed files with 42 additions and 2 deletions

View File

@@ -84,6 +84,11 @@ test_assert_mat4_eq2(mat4 m1, mat4 m2, float eps) {
}
}
void
test_assert_eqf(float a, float b) {
assert_true(fabsf(a - b) <= 0.000009); /* rounding errors */
}
void
test_assert_vec3_eq(vec3 v1, vec3 v2) {
assert_true(fabsf(v1[0] - v2[0]) <= 0.000009); /* rounding errors */