-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
Hi, recently I've found a need for scaling rotations described by unit quaternions, by which I mean produce a rotation along the same axis only with a different angle. I've written a small function for this purpose
function scale(q::Q,w::Real) where Q <: UnitQuaternion
θ = rotation_angle(q)
axis = rotation_axis(q)
s,c = sincos(w*θ/2)
return Q(c,s*axis[1],s*axis[2],s*axis[3],false)
end
not wanting to override the current function (*)(q::Q, w::Real) where Q<:UnitQuaternion. Would any one else see use in adding such a method to the package?