Hi everyone, I started working on a little game engine to get the hang of Zig but I found out that every Zig math library had a very “ugly” API or more importantly it was very out of date with the master branch.
That’s why I decided to make my own, and it turned out great that I moved the library to separate repo. It’s fast, has an easy and intuitive API (in my opinion) and it’s up to date with the master branch.
You can find it at https://github.com/griush/zm.
It’s still missing some useful stuff but I’m working on all of it. Contributions and suggestions are very welcome.
Looks great! If I ever need a math library, I’ll reach for this one. And you got the docs working too!
One thing to point out is that adding the master ref as the package url can be problematic. It makes updating the package confusing. I would suggest point them to using zig fetch, or have the example for the build.zig.zon be pinning to a specific version that you have tagged.
The mentioned zig fetch --save git+https://github.com/griush/zm
will add an url that contains the commit hash as the #fragment
part of the url, that automatically points to the commit the branch had.
I think that is the best way to refer to other repositories that is currently supported. I would remove the manual editing of build.zig.zon
.
Or maybe put it under a section for older zig versions.
Thanks for the feedback! You’re right, I had some problems after updating the repo, then in another project I had to manually delete global cache every time.
I’ll change that for sure.
switch (type_info) {
.Int, .Float => {},
else => @compileError("QuaternionBase only supports floating point types. Type '" ++ @typeName(T) ++ "' is not supported"),
}
I think you meant to remove .Int
?
lol, I swear I thought I removed that. Thanks