{"id":19390161,"url":"https://github.com/thomas-chqt/math","last_synced_at":"2026-06-10T01:31:38.198Z","repository":{"id":244332298,"uuid":"805140978","full_name":"Thomas-Chqt/Math","owner":"Thomas-Chqt","description":"Math library for graphic project","archived":false,"fork":false,"pushed_at":"2024-11-17T16:30:15.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T20:54:59.654Z","etag":null,"topics":["cpp","graphics-programming","library","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/Thomas-Chqt.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":"2024-05-24T00:56:55.000Z","updated_at":"2024-11-17T16:30:16.000Z","dependencies_parsed_at":"2024-07-11T05:26:55.178Z","dependency_job_id":"4c0fcb09-a3da-4e92-8eeb-718a27a13aff","html_url":"https://github.com/Thomas-Chqt/Math","commit_stats":null,"previous_names":["thomas-chqt/math"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Thomas-Chqt/Math","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-Chqt%2FMath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-Chqt%2FMath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-Chqt%2FMath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-Chqt%2FMath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Thomas-Chqt","download_url":"https://codeload.github.com/Thomas-Chqt/Math/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-Chqt%2FMath/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284982746,"owners_count":27095048,"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","status":"online","status_checked_at":"2025-11-17T02:00:06.431Z","response_time":55,"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","graphics-programming","library","math"],"created_at":"2024-11-10T10:19:13.223Z","updated_at":"2025-11-18T01:02:06.752Z","avatar_url":"https://github.com/Thomas-Chqt.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Math\n====\n\n**Math** is a C++ library designed to extend the functionality of the [UtilsCPP](https://github.com/Thomas-Chqt/UtilsCPP.git) library for projects that require efficient linear algebra operations. It provides essential tools for handling vectors and matrices, making it ideal for graphics programming. \n\nThe library is still under active development and is being built alongside other projects, with new functionality added as needed to meet evolving project requirements.\n\nFeatures\n--------\n\nThis library includes various structures for vectors and matrices:\n\n- **Vectors**\n  - `vec2f` : 2D vector of floats\n  - `vec3f` : 3D vector of floats\n  - `vec4f` : 4D vector of floats\n- **Matrices**\n  - `mat3x3` : 3x3 matrix of floats\n  - `mat4x4` : 4x4 matrix of floats\n\nIn addition to basic arithmetic operations such as vector addition and subtraction or matrix multiplications, **Math** also supports more advanced features:\n\n- Matrix determinant and inversion functions\n- Generation of rotation, translation, and scale matrices\n\nThe types in this library are fully compatible with Apple's Metal graphics API in terms of size and alignment, ensuring smooth integration with Metal Shading Language (MSL) for graphics programming.\n\nBuild\n-----\n\nCMake is used as the build system. The recommended way to use the library is to clone the repository inside your project and use `add_subdirectory`.\n\nAlternatively, the library can be built separately using CMake.\n\n```sh\nmkdir build\ncmake -S . -B build\ncmake --build build\n```\n\n| CMake Option          | Default Value | Description                |\n|-----------------------|---------------|----------------------------|\n| `BUILD_SHARED_LIBS`   | OFF           | Build as shared library    |\n| `MATH_BUILD_TESTS`    | OFF           | Build the test executable  |\n| `MATH_INSTALL`        | ON            | Enable the install command |\n\nLearning\n--------\n\nWriting this Math library helped me deepen my understanding of several key concepts.  \nOne of the biggest challenges was learning linear algebra, as I hadn't studied it formally beyond basic vectors. I had to teach myself how to perform operations like matrix multiplication.  \nAdditionally, this project improved my knowledge of C++ templates, particularly template specialization.  \nEnsuring compatibility with Apple's Metal API also presented a challenge, as I initially faced issues with memory alignment. After consulting the Metal Shading Language documentation, I successfully resolved these problems using `alignas()`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-chqt%2Fmath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomas-chqt%2Fmath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-chqt%2Fmath/lists"}