{"id":20802035,"url":"https://github.com/griush/zm","last_synced_at":"2025-10-03T15:37:36.732Z","repository":{"id":245601738,"uuid":"809059774","full_name":"griush/zm","owner":"griush","description":"zm - Fast, Zig math library, fully cross-platform","archived":false,"fork":false,"pushed_at":"2025-03-22T08:51:41.000Z","size":121,"stargazers_count":62,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T04:41:12.411Z","etag":null,"topics":["game-development","gamedev","math","zig","zig-package"],"latest_commit_sha":null,"homepage":"https://griush.github.io/zm/","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/griush.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-01T15:15:45.000Z","updated_at":"2025-03-29T08:09:57.000Z","dependencies_parsed_at":"2024-06-23T00:48:45.640Z","dependency_job_id":"f92adbc8-cdf7-4c2d-b196-a31e05c4f6c6","html_url":"https://github.com/griush/zm","commit_stats":null,"previous_names":["griush/arion-math","griush/zm"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/griush%2Fzm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/griush%2Fzm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/griush%2Fzm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/griush%2Fzm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/griush","download_url":"https://codeload.github.com/griush/zm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252793564,"owners_count":21805054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game-development","gamedev","math","zig","zig-package"],"created_at":"2024-11-17T18:27:49.730Z","updated_at":"2025-10-03T15:37:36.727Z","avatar_url":"https://github.com/griush.png","language":"Zig","funding_links":[],"categories":["Zig"],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/griush/resources/f5f9659dd5c4d18d63ff9bc2e67b8feee874e482/logos/zm-dark.svg#gh-dark-mode-only\" alt=\"zm Logo\" width=\"400px\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/griush/resources/f5f9659dd5c4d18d63ff9bc2e67b8feee874e482/logos/zm-light.svg#gh-light-mode-only\" alt=\"zm Logo\" width=\"400px\"\u003e\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/griush/zm/ci.yaml?style=flat\u0026logo=github\u0026label=CI)\n\n# zm - Fast math library\nzm is a Zig math library. It is fast, easy to use and cross-platform.\n\n## Usage\n\u003e [!NOTE]\n\u003e This library is tracking Zig's master branch. Last tested with `0.16.0-dev.43+99b2b6151`.\n\u003e It may not compile with newer or older versions.\n\nRun `zig fetch --save git+https://github.com/griush/zm` on the directory of your `build.zig` and `build.zig.zon`.\n\nThen in the `build.zig` add:\n```zig\nconst zm = b.dependency(\"zm\", .{\n    .target = target,\n    .optimize = optimize,\n});\nmodule.addImport(\"zm\", zm.module(\"zm\"));\n```\nNow, in your code, you can use:\n```zig\nconst zm = @import(\"zm\");\n```\n\n### Getting Started\nFor an example using Zig's build system see: [example](/example/).\n\nSimple example:\n```zig\nconst zm = @import(\"zm\");\nconst std = @import(\"std\");\n\npub fn main() !void {\n    // Initialize window (with GLFW for example)\n\n    // Create OpenGL/Vulkan... context\n\n    const projection = zm.Mat4.perspective(zm.toRadians(60.0), 16.0 / 9.0, 0.05, 100.0);\n    const view = zm.Mat4.translation(0.0, 0.75, 5.0);\n    const view_proj = projection.multiply(view);\n\n    // Upload data. Matrix should be transposed in OpenGL as they use column-major matrices.\n    gl.NamedBufferSubData(ubo, 0, @sizeOf(zm.Mat4), \u0026view_proj);\n\n    // Render loop\n\n    // Cleanup\n}\n```\n\n## Benchmarks\nSee [benchmarks](/test/benchmark.zig).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgriush%2Fzm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgriush%2Fzm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgriush%2Fzm/lists"}