Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
ndcurves
Commits
925e6ac9
Unverified
Commit
925e6ac9
authored
Dec 13, 2019
by
Fernbach Pierre
Committed by
GitHub
Dec 13, 2019
Browse files
Merge pull request #18 from pFernbach/topic/update_eigenpy
[Tests][Python] use Quaternion.isApprox to test equality instead of ==
parents
5fd4ed0f
0997be73
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/test/test.py
View file @
925e6ac9
...
...
@@ -786,10 +786,10 @@ class TestCurves(unittest.TestCase):
self
.
assertTrue
(
isclose
(
so3Rot
(
max
),
end_rot
).
all
())
self
.
assertTrue
(
isclose
(
so3Quat
(
min
),
init_rot
).
all
())
self
.
assertTrue
(
isclose
(
so3Quat
(
max
),
end_rot
).
all
())
self
.
assert
Equal
(
so3Rot
.
computeAsQuaternion
(
min
)
,
init_quat
)
self
.
assert
Equal
(
so3Rot
.
computeAsQuaternion
(
max
)
,
end_quat
)
self
.
assert
Equal
(
so3Quat
.
computeAsQuaternion
(
min
)
,
init_quat
)
self
.
assert
Equal
(
so3Quat
.
computeAsQuaternion
(
max
)
,
end_quat
)
self
.
assert
True
(
so3Rot
.
computeAsQuaternion
(
min
)
.
isApprox
(
init_quat
)
)
self
.
assert
True
(
so3Rot
.
computeAsQuaternion
(
max
)
.
isApprox
(
end_quat
)
)
self
.
assert
True
(
so3Quat
.
computeAsQuaternion
(
min
)
.
isApprox
(
init_quat
)
)
self
.
assert
True
(
so3Quat
.
computeAsQuaternion
(
max
)
.
isApprox
(
end_quat
)
)
t
=
min
while
t
<
max
:
self
.
assertTrue
(
isclose
(
so3Quat
(
t
),
so3Rot
(
t
)).
all
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment