{"id":51261605,"url":"https://github.com/nesktf/ranmath","last_synced_at":"2026-06-29T12:32:10.622Z","repository":{"id":350545282,"uuid":"1207235121","full_name":"nesktf/ranmath","owner":"nesktf","description":"Header only 3D graphics math library for C++20","archived":false,"fork":false,"pushed_at":"2026-05-22T03:48:22.000Z","size":290,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-22T12:44:43.832Z","etag":null,"topics":["cpp","cpp20","graphics-programming","header-only","math"],"latest_commit_sha":null,"homepage":"","language":"C++","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/nesktf.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-10T18:11:53.000Z","updated_at":"2026-05-22T03:48:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nesktf/ranmath","commit_stats":null,"previous_names":["nesktf/ranmath"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nesktf/ranmath","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesktf%2Franmath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesktf%2Franmath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesktf%2Franmath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesktf%2Franmath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nesktf","download_url":"https://codeload.github.com/nesktf/ranmath/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesktf%2Franmath/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34927675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cpp","cpp20","graphics-programming","header-only","math"],"created_at":"2026-06-29T12:32:09.871Z","updated_at":"2026-06-29T12:32:10.608Z","avatar_url":"https://github.com/nesktf.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ran::math\n![ranmath](res/ranmath.png)\n\nHeader only 3D graphics math library for C++20. Optimized to be used with Vulkan \u0026 OpenGL.\n\n## Building \nClone the repo somewhere in your project's library folder.\n\n```sh \n$ cd my_funny_project/\n$ mkdir -p lib/\n$ git clone https://github.com/nesktf/ranmath.git ./lib/ranmath\n```\nThen add the library as a subdirectory in your CMakeLists.txt.\n\n```cmake\ncmake_minimum_required(VERSION 3.25)\nproject(my_funny_project CXX)\n# ...\nadd_subdirectory(\"lib/ranmath\")\n# ...\nset_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20)\ntarget_link_libraries(${PROJECT_NAME} ranmath::ranmath)\n```\n\nAlternatively, you can generate a single header file either by using the script at\n`script/single.py` or by defining the option `RAN_SINGLE` and running `make`. You need\nPython 3 installed and available in your PATH.\n\n```sh \n$ cmake -B build -DRAN_SINGLE=1\n$ make -C build -j$(nproc)\n```\n\nThe script generates two header files: `ranmath/ran.hpp` with definitions and `ranmath/forward.hpp`\nwith declarations. These two are written to `\u003cpath/to/build\u003e/include/` by default. You can\njust copy these two to your project folder and use them directly.\n\n```sh\n$ mkdir -p lib/ranmath/\n$ cp build/include/ranmath* lib/ranmath/\n```\n\n## Usage\nInclude either `\u003cranmath/forward.hpp\u003e` for forward declarations or `\u003cranmath/ran.hpp\u003e` for the\nactual definitions.\n\nThe library has a similar API to [GLM](https://github.com/g-truc/glm) with some small\ndifferences to suit my tastes. Matrices are column major just like GLM.\n\n```cpp\n#include \u003cranmath/ran.hpp\u003e\n\nran::Vec3f32 rotate_y(ran::Vec3f32 vec, ran::f32 angle) {\n  const auto mat = ran::rotate(ran::Mat4f32::identity(), angle, ran::Vec3f32(0.f, 1.f, 0.f));\n  return vec * mat;\n}\n```\n\n## TODO\n- Add feature list\n- Add tests\n- Add docs\n- Add examples\n- Add C++20 module\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnesktf%2Franmath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnesktf%2Franmath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnesktf%2Franmath/lists"}