Skip to content

Commit

Permalink
fixed numerical precision issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
dictoon committed Nov 16, 2012
1 parent 8ad41fb commit 5980f22
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/appleseed/renderer/meta/tests/test_transformsequence.cpp
Expand Up @@ -346,7 +346,7 @@ TEST_SUITE(Renderer_Utility_TransformSequence)
const AABB3d bbox(Vector3d(1.0, 1.0, 0.0), Vector3d(1.0, 1.0, 0.0));
const AABB3d motion_bbox = sequence.to_parent(bbox);

EXPECT_EQ(AABB3d(Vector3d(0.54119610014619690, 1.0, 0.0), Vector3d(1.0, 1.3065629648763766, 0.0)), motion_bbox);
EXPECT_FEQ(AABB3d(Vector3d(0.54119610014619690, 1.0, 0.0), Vector3d(1.0, 1.3065629648763766, 0.0)), motion_bbox);
}

TEST_CASE(ToParent_SmallNegativeRotation)
Expand All @@ -359,7 +359,7 @@ TEST_SUITE(Renderer_Utility_TransformSequence)
const AABB3d bbox(Vector3d(1.0, 1.0, 0.0), Vector3d(1.0, 1.0, 0.0));
const AABB3d motion_bbox = sequence.to_parent(bbox);

EXPECT_EQ(AABB3d(Vector3d(1.0, 0.54119610014619690, 0.0), Vector3d(1.3065629648763766, 1.0, 0.0)), motion_bbox);
EXPECT_FEQ(AABB3d(Vector3d(1.0, 0.54119610014619690, 0.0), Vector3d(1.3065629648763766, 1.0, 0.0)), motion_bbox);
}

TEST_CASE(ToParent_LargePositiveRotation)
Expand All @@ -372,7 +372,7 @@ TEST_SUITE(Renderer_Utility_TransformSequence)
const AABB3d bbox(Vector3d(1.0, 1.0, 0.0), Vector3d(1.0, 1.0, 0.0));
const AABB3d motion_bbox = sequence.to_parent(bbox);

EXPECT_EQ(AABB3d(Vector3d(-1.4142135623730949, -0.54119610014619690, 0.0), Vector3d(1.0, 1.4142135623730949, 0.0)), motion_bbox);
EXPECT_FEQ(AABB3d(Vector3d(-1.4142135623730949, -0.54119610014619690, 0.0), Vector3d(1.0, 1.4142135623730949, 0.0)), motion_bbox);
}

TEST_CASE(ToParent_LargeNegativeRotation)
Expand All @@ -385,7 +385,7 @@ TEST_SUITE(Renderer_Utility_TransformSequence)
const AABB3d bbox(Vector3d(1.0, 1.0, 0.0), Vector3d(1.0, 1.0, 0.0));
const AABB3d motion_bbox = sequence.to_parent(bbox);

EXPECT_EQ(AABB3d(Vector3d(-0.54119610014619690, -1.4142135623730951, 0.0), Vector3d(1.4142135623730949, 1.0, 0.0)), motion_bbox);
EXPECT_FEQ(AABB3d(Vector3d(-0.54119610014619690, -1.4142135623730951, 0.0), Vector3d(1.4142135623730949, 1.0, 0.0)), motion_bbox);
}

void visualize(
Expand Down

0 comments on commit 5980f22

Please sign in to comment.