implement vec2

This commit is contained in:
Recep Aslantas
2019-03-31 18:50:52 +03:00
parent 4c5451994f
commit 0729fd40a4
13 changed files with 742 additions and 2 deletions

View File

@@ -112,6 +112,12 @@ test_assert_eqf(float a, float b) {
assert_true(fabsf(a - b) <= 0.000009); /* rounding errors */
}
void
test_assert_vec2_eq(vec2 v1, vec2 v2) {
assert_true(fabsf(v1[0] - v2[0]) <= 0.000009); /* rounding errors */
assert_true(fabsf(v1[1] - v2[1]) <= 0.000009);
}
void
test_assert_vec3_eq(vec3 v1, vec3 v2) {
assert_true(fabsf(v1[0] - v2[0]) <= 0.000009); /* rounding errors */