# HandmadeMath/HandmadeMath

A simple math library for games and computer graphics. Compatible with both C and C++. Public domain and easy to modify.

Repository: https://github.com/HandmadeMath/HandmadeMath
Canonical: https://ross.abutalabs.com/products/handmademath
Language: C
License: CC0-1.0
License Family: permissive
Topics: math, game-development, graphics, matrix, single-header, vector
Last push: 2026-03-17T10:52:40+00:00

## Health v2 (maintenance only)
Score: 55/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 72, release rhythm 8, longevity 100
- inputs: {"age_days": 3879, "days_push": 169, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1601, forks 109 (observed 2026-08-28T04:05:09.640462+00:00)

## What it is
HandmadeMath is a single-header math library for games and computer graphics, providing vectors, matrices, and quaternions in both C and C++. It is public domain (CC0), cross-platform, and supports all common graphics API conventions.

## Use cases
- vector and matrix math for a game engine
- linear algebra library for C graphics code
- quaternion rotations for 3D rendering
- single-header math library with no dependencies
- projection matrices for OpenGL or Vulkan
- math library usable from both C and C++

## When to choose
- you need a lightweight, dependency-free math library for graphics or games
- your codebase mixes C and C++
- you want public domain code you can freely modify
- you need support for multiple handedness and NDC conventions

## When to avoid
- you need advanced features like SIMD auto-vectorization tuning, dual quaternions, or symbolic math
- you prefer a large, actively maintained ecosystem like GLM or Eigen
- you need GPU-side math or shader libraries

## Facets
- artifact type: library
- maturity: stable
- function: math, graphics, game-engine
- domain: graphics, developer-tools
- platform: cross-platform, cpp, c
- tags: single-header, vectors, matrices, quaternions, public-domain, linear-algebra, c-and-cpp, game-development

## Member repositories
- HandmadeMath/HandmadeMath (main) score 55

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:09.640462+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:52:39.640384+00:00, confidence not recorded.
  - readme: https://github.com/HandmadeMath/HandmadeMath (fetched 2026-08-28T04:05:09.640462+00:00, sha f592c6deea6a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
