mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
fix
This commit is contained in:
@@ -59,7 +59,7 @@ namespace omath
|
||||
const auto sideB = SideBLength();
|
||||
const auto hypot = Hypot();
|
||||
|
||||
return sideA*sideA + sideB*sideB == hypot*hypot;
|
||||
return std::abs(sideA*sideA + sideB*sideB - hypot*hypot) <= 0.0001f;
|
||||
}
|
||||
[[nodiscard]]
|
||||
constexpr Vector3 SideBVector() const
|
||||
|
||||
@@ -113,8 +113,7 @@ TEST_F(UnitTestTriangle, SideVectors)
|
||||
|
||||
TEST_F(UnitTestTriangle, IsRectangular)
|
||||
{
|
||||
EXPECT_TRUE(t1.IsRectangular());
|
||||
EXPECT_TRUE(t3.IsRectangular());
|
||||
EXPECT_TRUE(Triangle<Vector3>({2,0,0}, {}, {0,2,0}).IsRectangular());
|
||||
}
|
||||
// Test midpoint
|
||||
TEST_F(UnitTestTriangle, MidPoint)
|
||||
|
||||
Reference in New Issue
Block a user