`On Friday, 9 February 2018 at 02:40:06 UTC, Nick Sabalausky`

`(Abscissa) wrote:`

On 02/08/2018 04:37 PM, Amorphorious wrote:On Thursday, 8 February 2018 at 15:23:05 UTC, Simen Kjæråswrote:So I was bored in a meeting and decided to implement ageneric template for defining complex numbers, dual numbers,quaternions and many other possible algebras by simplydefining a set of rules and the components on which they act:source: https://gist.github.com/Biotronic/833680b37d4afe774c8562fd21554c6bCool. Took me a while to start to understand it and still not100% grokked (partly because I've never quite been able tofully grasp quaternion math (at least, beyond Unity3D'sultra-easy abstraction for it) and never heard of dual numbersbefore), but staring at the complex number example helped seehow this works. It's a very cool idea!

`quats are just complex numbers with extra variables like i. Each`

`one is the square root of -1, but they are obviously incompatible.`

i^2 = j^2 = k^2 = -1 https://en.wikipedia.org/wiki/Quaternion See the multiplication table.

`It's just an "extension" of complex numbers. They are homomorphic`

`to 4x4 matrices but sometimes easier to work with.`

Nothing really special about them... sorta like pepsi vs coke.

It would be nice if you learned how to document your code.It's not always easy for someone on the outside to be able topick it up and it ultimately means your hard work will be lessused as it could be. I know that sometimes comments can beredundant but it can also provide a better understanding.Well, that's the difference between a formal library packagerelease vs sharing a working proof of concept jotted down topass time ;)

`Yes, but he can go back an add some friendly text at some`

`point... He knows most about it so it is much easier and`

`shouldn't take more than a few mins.`