Skip to content

Commit 424595c

Browse files
authored
[test_geometry] Test constructor from vector (#1)
1 parent 61d2534 commit 424595c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

unittest/python/test_geometry.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ def isapprox(a,b,epsilon=1e-6):
1818
assert(isapprox(np.linalg.norm(q.coeffs()),q.norm()))
1919
assert(isapprox(np.linalg.norm(q.coeffs()),1))
2020

21+
v = np.array([0.5,-0.5,0.5,0.5])
22+
qv = Quaternion(v)
23+
assert(isapprox(qv.coeffs(), v))
24+
2125
r = AngleAxis(q)
2226
q2 = Quaternion(r)
2327
assert(q==q)

0 commit comments

Comments
 (0)