MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / TEST

Function TEST

tests/src/Base/Rotation.cpp:8–24  ·  view source on GitHub ↗

NOLINTBEGIN(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)

Source from the content-addressed store, hash-verified

6
7// NOLINTBEGIN(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
8TEST(Rotation, TestNonUniformScaleLeft)
9{
10 Base::Rotation rot;
11 rot.setYawPitchRoll(45.0, 0.0, 0.0);
12
13 Base::Matrix4D mat;
14 rot.getValue(mat);
15
16 Base::Matrix4D scale;
17 scale.scale(1.0, std::sqrt(3.0), 1.0);
18
19 Base::Rotation scaled_rot(scale * mat);
20
21 rot.setYawPitchRoll(60.0, 0.0, 0.0);
22 EXPECT_EQ(scaled_rot.isSame(rot, 1.0e-7), true);
23 EXPECT_EQ(rot.isSame(scaled_rot, 1.0e-7), true);
24}
25
26TEST(Rotation, TestNonUniformScaleRight)
27{

Callers

nothing calls this directly

Calls 7

sqrtFunction · 0.50
setYawPitchRollMethod · 0.45
getValueMethod · 0.45
scaleMethod · 0.45
isSameMethod · 0.45
setColMethod · 0.45
isIdentityMethod · 0.45

Tested by

no test coverage detected