I've been working on this pretty extensively for the past couple weeks, and I think I'm finally ready to post it.
Mathgl is a vector, matrix, and quaternion library for Go. Right now I consider it "working", but that doesn't mean "complete." It's stable in that it provably works for simple applications (as seen in the examples), however, the tests likely aren't thorough enough to guarantee that every edge case is covered and it will never freak out on you in a complex application.
It's geared towards 3D math and the goal of the project is to get it up to the point that maybe some day it will be rolled in with go-gl (
github.com/go-gl).
I encourage people to use it for simple OpenGL applications, I ported the first 8 tutorials on
opengl-tutorials.org to Go replacing uses of GLM with mathgl (at the moment, porting the rest of the tutorials is halted until I find a way to bypass an AMD driver bug). For the willing, though, what I really need is people to A. Interpret the benchmarks (I don't have a handle on how good/bad they are), B. Suggest API improvements and C. Help think of/write more tests and benchmarks.
At the moment, it kind of sidesteps the lack of generics with some fancy wrapper and enum tricks. As I mention in the README, I'm considering just dropping support for int32s and uint32s entirely and making everything float64s -- with the option to request an array of other types when needed (like the AsArray method already does now). This should speed it up at least a little and remove some of the kludgyness, but it also removes the ability to use other types should people need them for some bizarre reason
There's also a "subpackage" called mathglfast which is experimental, nowhere near as mature, and relies on arrays rather than slices, and spells out all the multiplications rather than using loops. So in THEORY it should be faster, but I'm not sure if it would improve speed enough enough to be worth it. Writing it is a huge pain as evidenced by all the code generation tricks I tried.
(And yes, I know about the math3D package. It appears to be dead, which is why I started this)