From 75e13a6039cab6c8bbde5bf6544efcdbfff0f30e Mon Sep 17 00:00:00 2001 From: Keuin Date: Fri, 22 Apr 2022 17:06:46 +0800 Subject: Delete vec3::refract. (buggy) --- test_vec.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'test_vec.cpp') 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(u.unit_vec(), 1).unit_vec()); - ASSERT_EQ(u.unit_vec(), n.refract(u.unit_vec(), 1).unit_vec()); - ASSERT_EQ(v.unit_vec(), n.refract(u.unit_vec(), 0.5).unit_vec()); - ASSERT_EQ(v.unit_vec(), n.refract(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(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)); -- cgit v1.2.3