Skip to content

Commit c116fdc

Browse files
authored
Fix test for slerp (#85)
* fix test for slerp * add scale parameter for slerp test
1 parent 4cf7f2d commit c116fdc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/Quaternion.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,10 +602,9 @@ Base.:(/)(a::MyReal, b::Real) = a.val / b
602602
@test slerp(a, b, 0.0).norm
603603
@test slerp(a, b, 1.0).norm
604604
@test slerp(a, b, 0.5).norm
605-
for _ in 1:100
605+
for _ in 1:100, scale in (1, 1e-5, 1e-10)
606606
q1 = quat(1, 0, 0, 0.0)
607-
# there are numerical stability issues with slerp atm
608-
θ = clamp(rand() * 3.5, deg2rad(5e-1), π)
607+
θ = rand() * π * scale
609608
ax = randn(3)
610609
q2 = qrotation(ax, θ)
611610
qsmall = qrotation(ax, cbrt(eps()))

0 commit comments

Comments
 (0)