# API Reference

Source: https://sh4zam.com/api/

> Every public SH4ZAM symbol, one page each, grouped by module

SH4ZAM 0.9.1 exposes 794 public C symbols across 10 modules, plus a C++ API in `namespace shz`. Every symbol has its own page at `/api/<module>/<name>/` with a Markdown twin at `/api/<module>/<name>.md`.

| Module | Header | Symbols | Description |
| --- | --- | --- | --- |
| [Scalar](https://sh4zam.com/api/scalar/) | `sh4zam/shz_scalar.h` | 56 | Scalar functions and utilities, including faster <math.h> replacements. |
| [Trigonometry](https://sh4zam.com/api/trig/) | `sh4zam/shz_trig.h` | 51 | Trig functions and utilities built around the SH4 FSCA instruction. |
| [Vector](https://sh4zam.com/api/vector/) | `sh4zam/shz_vector.h` | 229 | API for vector math: 2D, 3D and 4D vector types and operations. |
| [Quaternion](https://sh4zam.com/api/quat/) | `sh4zam/shz_quat.h` | 47 | Routines for quaternion math. |
| [Matrix](https://sh4zam.com/api/matrix/) | `sh4zam/shz_matrix.h` | 120 | In-memory matrix manipulation for 4x4 and smaller matrices. |
| [XMTRX](https://sh4zam.com/api/xmtrx/) | `sh4zam/shz_xmtrx.h` | 140 | API for managing the SH4's "active matrix", the 16 back-bank FP registers. |
| [Complex](https://sh4zam.com/api/complex/) | `sh4zam/shz_complex.h` | 52 | API for representing and operating on complex numbers, plus an SH4-optimized FFT. |
| [Memory](https://sh4zam.com/api/memory/) | `sh4zam/shz_mem.h` | 23 | Routines for copying memory, store queues, cache operations and prefetching. |
| [Compiler Definitions](https://sh4zam.com/api/cdefs/) | `sh4zam/shz_cdefs.h` | 67 | Preprocessor definitions: back-end and target detection, TLS model, utilities and aliasing types. |
| [Version](https://sh4zam.com/api/version/) | `sh4zam/shz_version.h` | 9 | Compile-time and link-time version checking of the SH4ZAM library. |

## Other ways in

- [C++ API](https://sh4zam.com/api/cpp/): `shz::vec3`, `shz::quat`, `shz::xmtrx` and the free-function aliases, mapped back to the C functions.
- [Cheatsheet](https://sh4zam.com/cheatsheet/): the whole API on one page, signature plus one line each.
- [`/api/index.json`](https://sh4zam.com/api/index.json): machine-readable symbol index ([schema](https://sh4zam.com/api/schema.json)). Per-module files live at `/api/<module>.json`.
- Search (top of every page) indexes symbol names and descriptions.

## Naming in one line

C functions are `shz_<module>_<verb>[_<qualifier>]`, types are `shz_<name>_t`, C++ lives in `namespace shz` with the `shz_` prefix dropped. Suffixes such as `_fsrra`, `_safe`, `_deg` and `_unaligned` change behavior; see [Naming and Suffixes](https://sh4zam.com/concepts/naming-and-suffixes/).
