API Reference
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 | sh4zam/shz_scalar.h | 56 | Scalar functions and utilities, including faster <math.h> replacements. |
| Trigonometry | sh4zam/shz_trig.h | 51 | Trig functions and utilities built around the SH4 FSCA instruction. |
| Vector | sh4zam/shz_vector.h | 229 | API for vector math: 2D, 3D and 4D vector types and operations. |
| Quaternion | sh4zam/shz_quat.h | 47 | Routines for quaternion math. |
| Matrix | sh4zam/shz_matrix.h | 120 | In-memory matrix manipulation for 4x4 and smaller matrices. |
| XMTRX | sh4zam/shz_xmtrx.h | 140 | API for managing the SH4's "active matrix", the 16 back-bank FP registers. |
| Complex | sh4zam/shz_complex.h | 52 | API for representing and operating on complex numbers, plus an SH4-optimized FFT. |
| Memory | sh4zam/shz_mem.h | 23 | Routines for copying memory, store queues, cache operations and prefetching. |
| Compiler Definitions | sh4zam/shz_cdefs.h | 67 | Preprocessor definitions: back-end and target detection, TLS model, utilities and aliasing types. |
| Version | sh4zam/shz_version.h | 9 | Compile-time and link-time version checking of the SH4ZAM library. |
Other ways in
Section titled “Other ways in”- C++ API:
shz::vec3,shz::quat,shz::xmtrxand the free-function aliases, mapped back to the C functions. - Cheatsheet: the whole API on one page, signature plus one line each.
/api/index.json: machine-readable symbol index (schema). Per-module files live at/api/<module>.json.- Search (top of every page) indexes symbol names and descriptions.
Naming in one line
Section titled “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.