{"id":13531569,"url":"https://github.com/HandmadeMath/HandmadeMath","last_synced_at":"2025-04-01T19:32:25.243Z","repository":{"id":37432525,"uuid":"49993383","full_name":"HandmadeMath/HandmadeMath","owner":"HandmadeMath","description":"A simple math library for games and computer graphics. Compatible with both C and C++. Public domain and easy to modify.","archived":false,"fork":false,"pushed_at":"2025-02-24T23:46:11.000Z","size":3495,"stargazers_count":1335,"open_issues_count":5,"forks_count":98,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-03-25T02:41:09.608Z","etag":null,"topics":["game-development","graphics","math","matrix","single-header","vector"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HandmadeMath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2016-01-20T00:38:28.000Z","updated_at":"2025-03-24T17:04:28.000Z","dependencies_parsed_at":"2023-02-15T12:15:50.441Z","dependency_job_id":"db72d285-adb2-4aac-87ab-b1356c9f3833","html_url":"https://github.com/HandmadeMath/HandmadeMath","commit_stats":null,"previous_names":["handmademath/handmade-math"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HandmadeMath%2FHandmadeMath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HandmadeMath%2FHandmadeMath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HandmadeMath%2FHandmadeMath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HandmadeMath%2FHandmadeMath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HandmadeMath","download_url":"https://codeload.github.com/HandmadeMath/HandmadeMath/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246277352,"owners_count":20751549,"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","graphics","math","matrix","single-header","vector"],"created_at":"2024-08-01T07:01:04.053Z","updated_at":"2025-04-01T19:32:20.225Z","avatar_url":"https://github.com/HandmadeMath.png","language":"C","readme":"# Handmade Math\n\nA single-file, cross-platform, public domain graphics math library for both C and C++. Supports vectors, matrices, quaternions, and all the utilities you'd expect.\n\nTo get started, go download [the latest release](https://github.com/HandmadeMath/HandmadeMath/releases).\n\n\u003e If you are upgrading to Handmade Math 2.0, save yourself some time and use our [automatic update tool](./update).\n\nHere's what sets Handmade Math apart:\n\n- **A simple single-header library.** Just `#include \"HandmadeMath.h\"`.\n- **Supports both C and C++.** While libraries like GLM only support C++, Handmade Math supports both C and C++, with convenient overloads wherever possible. For example, C++ codebases get operator overloading, and C11 codebases get `_Generic` versions of common operations.\n- **Supports all graphics APIs.** Handmade Math has left- and right-handed versions of each operation, as well as support for zero-to-one and negative-one-to-one NDC conventions.\n- **Swizzling, sort of.** Handmade Math's vector types use unions to provide several ways of accessing the same underlying data. For example, the components of an `HMM_Vec3` can be accessed as `XYZ`, `RGB`, or `UVW` - or subsets can be accessed like `.XY` and `.YZ`.\n- **Your choice of angle unit.** While Handmade Math uses radians by default, you can configure it to use degrees or [turns](https://www.computerenhance.com/p/turns-are-better-than-radians) instead.\n\n\n## Usage\n\nSimply `#include \"HandmadeMath.h\"`. All functions are `static inline`, so there is no need for an \"implementation\" file as with some other single-header libraries.\n\nA few config options are available. See the header comment in [the source](./HandmadeMath.h) for details.\n\n\n## FAQ\n\n**What conventions does HMM use, e.g. row vs. column major, handedness, etc.?**\n\nHandmade Math's matrices are column-major, i.e. data is stored by columns, then rows. It also assumes column vectors, i.e. vectors are written vertically and matrix-vector multiplication is `M * V` instead of `V * M`. For more information, see [this issue](https://github.com/HandmadeMath/HandmadeMath/issues/124#issuecomment-775737253).\n\nFor other properties, we provide variants for each common convention. Functions that care about handedness have left-handed (`LH`) and right-handed (`RH`) variants. Projection functions have zero-to-one (`ZO`) and negative-one-to-one (`NO`) variants for different NDC conventions.\n\n**What if I don't want the `HMM_` prefix?**\n\nDo a find and replace in the library source.\n\n**What's the license?**\n\nThis library is in the public domain. You can do whatever you want with it.\n\n**Where can I contact you to ask questions?**\n\nFeel free to make GitHub issues for any questions, concerns, or problems you encounter.\n","funding_links":[],"categories":["Game Programming","Libraries","C"],"sub_categories":["C"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHandmadeMath%2FHandmadeMath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHandmadeMath%2FHandmadeMath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHandmadeMath%2FHandmadeMath/lists"}