mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
- separating struct types into types-struct.h
- vec3s implementation - fix style issues
This commit is contained in:
@@ -47,6 +47,14 @@ test_rand_vec3(vec3 dest) {
|
||||
dest[2] = drand48();
|
||||
}
|
||||
|
||||
vec3s
|
||||
test_rand_vec3s()
|
||||
{
|
||||
vec3s r;
|
||||
test_rand_vec3(r.raw);
|
||||
return r;
|
||||
}
|
||||
|
||||
void
|
||||
test_rand_vec4(vec4 dest) {
|
||||
srand((unsigned int)time(NULL));
|
||||
@@ -127,6 +135,12 @@ test_assert_vec3_eq(vec3 v1, vec3 v2) {
|
||||
assert_true(fabsf(v1[2] - v2[2]) <= 0.000009);
|
||||
}
|
||||
|
||||
void
|
||||
test_assert_vec3s_eq(vec3s v1, vec3s v2)
|
||||
{
|
||||
test_assert_vec3_eq(v1.raw, v2.raw);
|
||||
}
|
||||
|
||||
void
|
||||
test_assert_vec4_eq(vec4 v1, vec4 v2) {
|
||||
assert_true(fabsf(v1[0] - v2[0]) <= 0.000009); /* rounding errors */
|
||||
|
||||
Reference in New Issue
Block a user