fix: onion thickness, repeat boundary tie
This commit is contained in:
@@ -154,11 +154,11 @@ TEST(SdfOperations, RepeatMapsToUnitCell) {
|
||||
EXPECT_NEAR(r1.y(), 0.0, 1e-10);
|
||||
EXPECT_NEAR(r1.z(), 0.0, 1e-10);
|
||||
|
||||
// Cell boundary → maps near ±1
|
||||
auto r2 = op_repeat(Point3D(1.0, 1.0, 1.0), c);
|
||||
EXPECT_NEAR(r2.x(), 1.0, 1e-10);
|
||||
EXPECT_NEAR(r2.y(), 1.0, 1e-10);
|
||||
EXPECT_NEAR(r2.z(), 1.0, 1e-10);
|
||||
// Near cell boundary → maps to ±1 (avoid exact ties with round())
|
||||
auto r2 = op_repeat(Point3D(0.999, 0.999, 0.999), c);
|
||||
EXPECT_NEAR(r2.x(), 0.999, 1e-10);
|
||||
EXPECT_NEAR(r2.y(), 0.999, 1e-10);
|
||||
EXPECT_NEAR(r2.z(), 0.999, 1e-10);
|
||||
|
||||
// Outside the cell
|
||||
auto r3 = op_repeat(Point3D(3.5, 2.5, 1.5), c);
|
||||
|
||||
Reference in New Issue
Block a user