Skip to content

Commit 37d80d7

Browse files
committed
🚨 Add tests for inverse rotation for CRP and MRP
1 parent 21c4a22 commit 37d80d7

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

test/inv_rotations.jl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,27 @@
5353

5454
eaie = inv(ea)
5555
@test eai eaie
56+
57+
# == Classical Rodrigues Parameters (CRP) ==========================================
58+
59+
# Create random CRP.
60+
c = rand(CRP{T})
61+
62+
ci = inv_rotation(c)
63+
@test eltype(ci) === T
64+
65+
cie = inv(c)
66+
@test ci cie
67+
68+
# == Modified Rodrigues Parameters (MRP) ===========================================
69+
70+
# Create random MRP.
71+
m = rand(MRP{T})
72+
73+
mi = inv_rotation(m)
74+
@test eltype(mi) === T
75+
76+
mie = inv(m)
77+
@test mi mie
5678
end
5779
end

0 commit comments

Comments
 (0)