Open DroneBetter opened 2 years ago
Wait a minute, the final one also replaces the uses of np.matrix and reduces numerical error (from the other pull requests) because I wanted to pull the slerp-and-conciseness branch into my master branch (into which I merged them also), sorry
The optimisation of
slerp()
(four fewer allocations, no inversion of one input quaternion necessary) is based on my independent derivation for my 3D engine hereintermediates()
needs only for the (n+1)th root of q1 to be calculated, then for q0 to be recursively multiplied by it, more efficiently (and could also be done more concisely byitertools.accumulate()
but would require a lambda function and would be no more efficient)