Closed stla closed 3 years ago
You are absolutely correct, thanks. One difficulty is that the idiom in the package seems to work for many simple examples but
> x1 <- 1+Hi
> x2 <- 1+Hi+Hj
> seq(from=x1,to=x2,len=3,slerp=TRUE)
[1] [2] [3]
Re 1 1.0546907 1
i 1 1.0546907 1
j 0 0.0000000 0
k 0 0.4740726 1
> seq(from=x1,to=x2,len=3,slerp=TRUE)[3] - x2
[1]
Re -1.110223e-16
i -1.110223e-16
j -1.000000e+00
k 1.000000e+00
> Mod(seq(from=x1,to=x2,len=3,slerp=TRUE)[3] - x2)
[1] 1.414214
>
I'll patch it when I get a minute, best wishes, Robin
Something wrong:
> x1 <- 1+Hi
> x2 <- 1+Hi+Hj
> seq(from=x1,to=x2,len=3,slerp=TRUE)
Error in is.finite(if (is.character(from)) from <- as.numeric(from) else from) :
default method not implemented for type 'S4'
In addition: Warning message:
In seq.default(from = x1, to = x2, len = 3, slerp = TRUE) :
extra argument ‘slerp’ will be disregarded
>
Hello,
I think that
seq
with the optionslerp = TRUE
is wrong. Look at this example:The last element of the sequence is not
q2
. That's wrong.The code is
from * (to/from)^h
. It should befrom * (Ainv(from)*to)^h
.