Skip to content

Commit

Permalink
suppress warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
recp committed Mar 31, 2024
1 parent 35a12ed commit 00d2e8a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/src/test_vec2.h
Original file line number Diff line number Diff line change
Expand Up @@ -802,11 +802,13 @@ TEST_IMPL(GLM_PREFIX, vec2_refract) {
/* Air to Glass (eta = 1.0 / 1.5) */
eta = 1.0f / 1.5f;
r = GLM(vec2_refract)(v, N, eta, dest);
ASSERT(r == true);
ASSERT(dest[1] < -sqrtf(0.5f)); // Expect bending towards the normal

/* Glass to Water (eta = 1.5 / 1.33) */
eta = 1.5f / 1.33f;
r = GLM(vec2_refract)(v, N, eta, dest);
ASSERT(r == true);
ASSERT(dest[1] < -sqrtf(0.5f)); // Expect bending towards the normal, less bending than air to glass

/* Diamond to Air (eta = 2.42 / 1.0) */
Expand Down
2 changes: 2 additions & 0 deletions test/src/test_vec3.h
Original file line number Diff line number Diff line change
Expand Up @@ -1908,13 +1908,15 @@ TEST_IMPL(GLM_PREFIX, vec3_refract) {
r = GLM(vec3_refract)(v, N, eta, dest);

/* Expect bending towards the normal */
ASSERT(r == true);
ASSERT(dest[1] < -sqrtf(0.5f));

/* Glass to Water (eta = 1.5 / 1.33) */
eta = 1.5f / 1.33f;
r = GLM(vec3_refract)(v, N, eta, dest);

/* Expect bending towards the normal, less bending than air to glass */
ASSERT(r == true);
ASSERT(dest[1] < -sqrtf(0.5f));

/* Diamond to Air (eta = 2.42 / 1.0) */
Expand Down
2 changes: 2 additions & 0 deletions test/src/test_vec4.h
Original file line number Diff line number Diff line change
Expand Up @@ -1591,11 +1591,13 @@ TEST_IMPL(GLM_PREFIX, vec4_refract) {
/* Air to Glass (eta = 1.0 / 1.5) */
eta = 1.0f / 1.5f;
r = GLM(vec4_refract)(v, N, eta, dest);
ASSERT(r == true);
ASSERT(dest[1] < -sqrtf(0.5f)); // Expect bending towards the normal

/* Glass to Water (eta = 1.5 / 1.33) */
eta = 1.5f / 1.33f;
r = GLM(vec4_refract)(v, N, eta, dest);
ASSERT(r == true);
ASSERT(dest[1] < -sqrtf(0.5f)); // Expect bending towards the normal, less bending than air to glass

/* Diamond to Air (eta = 2.42 / 1.0) */
Expand Down

0 comments on commit 00d2e8a

Please sign in to comment.