diff options
author | Keuin <[email protected]> | 2022-04-22 17:06:46 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-04-22 17:06:46 +0800 |
commit | 75e13a6039cab6c8bbde5bf6544efcdbfff0f30e (patch) | |
tree | c84f6bdb1af2a1e3e54a0956cf1d93b4db7867b2 /test_vec.cpp | |
parent | f4343562f08121928dd7a479227df5c7cff3b680 (diff) |
Delete vec3::refract. (buggy)
Diffstat (limited to 'test_vec.cpp')
-rw-r--r-- | test_vec.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/test_vec.cpp b/test_vec.cpp index a81ee09..537e556 100644 --- a/test_vec.cpp +++ b/test_vec.cpp @@ -106,19 +106,6 @@ TEST(Vec, Reflect) { ASSERT_EQ(v, n.reflect(u)); } -TEST(Vec, Refract) { - vec3d n{1, 0, 0}, u{-1, 0, -1}, v{-sqrt(14), 0, -sqrt(2)}; - ASSERT_EQ(u.unit_vec(), n.refract<true>(u.unit_vec(), 1).unit_vec()); - ASSERT_EQ(u.unit_vec(), n.refract<false>(u.unit_vec(), 1).unit_vec()); - ASSERT_EQ(v.unit_vec(), n.refract<true>(u.unit_vec(), 0.5).unit_vec()); - ASSERT_EQ(v.unit_vec(), n.refract<false>(u.unit_vec(), 0.5).unit_vec()); -} - -TEST(Vec, Refract_TIR) { - vec3d n{1, 0, 0}, u{-1, 0, -sqrt(3)}, v{1, 0, -sqrt(3)}; - ASSERT_EQ(v.unit_vec(), n.refract<true>(u.unit_vec(), 2)); -} - TEST(Vec, VecParallel) { vec3d a{1, 1, 2}, b{1.1, 1.1, 2.2}, c{0,0,0}, d{1, 2, 1}; ASSERT_TRUE(a.parallel(b)); |