Needs: - [x] Ability to elementwise apply a function to a vector - [x] LERP (std::mix) for vectors - [x] Quaternion Type (protected extension of vec<4>) - [x] Elementwise + - [x] Elementwise - - [x] Elementwise scalar * - [x] Elementwise scalar / - [x] Standard dot product - [x] Multiply: [sa,a][sb,b]=[sasb−a⋅b,sab+sba+a×b] - [x] Conjugate: [s, -v] - [x] Squared Norm: Q * Q.conjugate - [x] Norm: sqrt(SquaredNorm) - [x] Normalized : Q / Q.norm - [x] Inverse: Q.conjugate / Q.norm - [x] Vector Multiply: [0, v'] = q[0, v]q−1 - [x] Angular difference: dot(q1, q2)/(q1.norm * q2.norm) - [x] To/from angle axis: [cos(θ/2),sin(θ/2)axis] - [ ] From euler angles: three angle axes multiplied together - [ ] To euler angles: https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles#Quaternion_to_Euler_angles_(in_3-2-1_sequence)_conversion - [ ] SLERP: https://www.3dgep.com/understanding-quaternions/#slerp
Needs: