Integrate Refactor solver sources and dual MSVC CMake builds
This commit is contained in:
@@ -112,5 +112,19 @@ TEST(Vector3, RejectsZeroAndNonfiniteNormalization) {
|
||||
EXPECT_FALSE(Vector3(0.0, not_a_number, 0.0).Normalized().has_value());
|
||||
}
|
||||
|
||||
|
||||
TEST(Vector3, RightHandedFrameMatchesIndependentCoordinateTransform) {
|
||||
const Vector3 x_axis{0.0, 1.0, 0.0};
|
||||
const Vector3 y_axis{0.0, 0.0, 1.0};
|
||||
const Vector3 z_axis = x_axis.Cross(y_axis);
|
||||
const Vector3 global{2.0, -3.0, 4.0};
|
||||
EXPECT_DOUBLE_EQ(x_axis.Dot(global), -3.0);
|
||||
EXPECT_DOUBLE_EQ(y_axis.Dot(global), 4.0);
|
||||
EXPECT_DOUBLE_EQ(z_axis.Dot(global), 2.0);
|
||||
const Vector3 recovered = x_axis * -3.0 + y_axis * 4.0 + z_axis * 2.0;
|
||||
EXPECT_TRUE(recovered == global);
|
||||
EXPECT_DOUBLE_EQ(x_axis.Dot(y_axis.Cross(z_axis)), 1.0);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace fesa
|
||||
|
||||
Reference in New Issue
Block a user