zm is a Zig math library. It is fast and easy to use.
Note
This library is tracking Zig's master branch. Last tested with 0.16.0-dev.164+bc7955306.
It may not compile with newer or older versions.
Run zig fetch --save git+https://github.com/griush/zm on the directory of your build.zig and build.zig.zon.
Then in the build.zig add:
const zm = b.dependency("zm", .{
.target = target,
.optimize = optimize,
});
module.addImport("zm", zm.module("zm"));Now, in your code, you can use:
const zm = @import("zm");For an example using Zig's build system see: example.
See benchmarks.