# recp/cglm

📽 Highly Optimized 2D / 3D Graphics Math (glm) for C

Repository: https://github.com/recp/cglm
Canonical: https://ross.abutalabs.com/products/cglm
Language: C
License: MIT
License Family: permissive
Topics: math, vector, matrix, euler, c, affine-transform-matrices, opengl, opengl-math, simd, sse, avx, neon, marix-inverse, matrix-decompositions, 3d, 3d-math, frustum, bounding-boxes, bezier, wasm
Last push: 2026-07-29T15:21:02+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 95, release rhythm 40, longevity 100
- inputs: {"age_days": 3643, "days_push": 35, "days_rel": 566, "gap_med": 0, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3004, forks 290 (observed 2026-08-28T04:07:37.574452+00:00)

## What it is
cglm is a highly optimized 2D/3D graphics math library for C, providing vector, matrix, quaternion, and affine transform operations similar to GLM. It is allocation-free, header-only, and SIMD-optimized (SSE, AVX, NEON) for fast graphics programming.

## Use cases
- do matrix and vector math for OpenGL rendering in C
- compute perspective and view matrices for a 3D camera
- implement quaternion rotations for a game engine
- do frustum culling and bounding box checks
- perform SIMD-optimized 3D math on ARM or x86
- use a header-only math library in a C graphics project
- calculate bezier curves and affine transforms

## When to choose
- writing C or C-with-graphics code that needs fast vector/matrix math
- you want a header-only, allocation-free math library
- you need SIMD optimizations across SSE, AVX, and NEON
- building game engines, renderers, or OpenGL/Vulkan applications in C

## When to avoid
- you are using C++ and prefer the full-featured GLM library
- you need a general-purpose linear algebra library with arbitrary-size matrices
- your project is in a language other than C

## Facets
- artifact type: library
- maturity: stable
- function: math, graphics, simulation
- domain: graphics, cross-platform
- platform: cross-platform, c, wasm
- tags: header-only, simd, opengl-math, vec3, mat4, quaternion, 3d-math, sse, avx, neon, game-development, algorithms, gpu

## Member repositories
- recp/cglm (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:37.574452+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-30T07:30:24.802533+00:00, confidence not recorded.
  - readme: https://github.com/recp/cglm (fetched 2026-08-28T04:07:37.574452+00:00, sha 587ea8e9d123)
- Data as of 2026-08-30T08:39:29.467469+00:00.
