# axooletclement/ac-math architecture

> Architecture diagram of the GitHub repository axooletclement/ac-math, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/axooletclement/ac-math
- Repository: https://github.com/axooletclement/ac-math

## Overview

AC-Math is a small C++ math library: its scalar, templated 3D/4D vectors and 3×3/4×4 matrices provide the main functionality, with a separate SIMD 4D-vector implementation. The sample executable constructs SIMD vectors, computes their dot product, and prints it. The README gives no further product workflow or capability detail; edges between matrix and vector types follow their includes and documented APIs, while the sample-to-SIMD implementation link is left unverified because the call goes through a declaration.

Main entry points: [`mathLibSIMD/include/Vec4.hpp`](https://github.com/axooletclement/ac-math/blob/main/mathLibSIMD/include/Vec4.hpp) (SIMD Vec4 API), [`mathLibCPP/Matrix4x4.h`](https://github.com/axooletclement/ac-math/blob/main/mathLibCPP/Matrix4x4.h) (Matrix4x4), [`mathLibSIMD/src/Vec4.cpp`](https://github.com/axooletclement/ac-math/blob/main/mathLibSIMD/src/Vec4.cpp) (SIMD Vec4 Ops), [`mathLibCPP/Vec3.h`](https://github.com/axooletclement/ac-math/blob/main/mathLibCPP/Vec3.h) (Vec3)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scalar["Scalar Math"]
  node_vec3["Vec3<br/>[Vec3.h]"]
  node_vec4["Vec4<br/>[Vec4.h]"]
  node_mat3["Matrix3x3<br/>[Matrix3x3.h]"]
  node_mat4["Matrix4x4<br/>[Matrix4x4.h]"]
end

subgraph group_simd["SIMD Math"]
  node_simd_api["SIMD Vec4 API<br/>[Vec4.hpp]"]
  node_simd_impl["SIMD Vec4 Ops<br/>[Vec4.cpp]"]
end

node_demo["Dot Demo<br/>[main.cpp]"]

node_mat3 -->|"uses type"| node_vec3
node_mat4 -->|"uses type"| node_vec3
node_mat4 -->|"uses type"| node_vec4
node_simd_impl -->|"implements"| node_simd_api
node_demo -->|"calls dot"| node_simd_api
node_simd_api -.->|"dispatches to"| node_simd_impl

click node_vec3 "https://github.com/axooletclement/ac-math/blob/main/mathLibCPP/Vec3.h"
click node_vec4 "https://github.com/axooletclement/ac-math/blob/main/mathLibCPP/Vec4.h"
click node_mat3 "https://github.com/axooletclement/ac-math/blob/main/mathLibCPP/Matrix3x3.h"
click node_mat4 "https://github.com/axooletclement/ac-math/blob/main/mathLibCPP/Matrix4x4.h"
click node_simd_api "https://github.com/axooletclement/ac-math/blob/main/mathLibSIMD/include/Vec4.hpp"
click node_simd_impl "https://github.com/axooletclement/ac-math/blob/main/mathLibSIMD/src/Vec4.cpp"
click node_demo "https://github.com/axooletclement/ac-math/blob/main/src/main.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_vec3,node_vec4,node_mat3,node_mat4 toneBlue
class node_simd_api,node_simd_impl toneAmber
class node_demo toneTeal
```

## Components

### Scalar Math

- [Vec3](https://github.com/axooletclement/ac-math/blob/main/mathLibCPP/Vec3.h): `mathLibCPP/Vec3.h`
- [Vec4](https://github.com/axooletclement/ac-math/blob/main/mathLibCPP/Vec4.h): `mathLibCPP/Vec4.h`
- [Matrix3x3](https://github.com/axooletclement/ac-math/blob/main/mathLibCPP/Matrix3x3.h): `mathLibCPP/Matrix3x3.h`
- [Matrix4x4](https://github.com/axooletclement/ac-math/blob/main/mathLibCPP/Matrix4x4.h): `mathLibCPP/Matrix4x4.h`

### SIMD Math

- [SIMD Vec4 API](https://github.com/axooletclement/ac-math/blob/main/mathLibSIMD/include/Vec4.hpp): `mathLibSIMD/include/Vec4.hpp`
- [SIMD Vec4 Ops](https://github.com/axooletclement/ac-math/blob/main/mathLibSIMD/src/Vec4.cpp): `mathLibSIMD/src/Vec4.cpp`

### Other components

- [Dot Demo](https://github.com/axooletclement/ac-math/blob/main/src/main.cpp): `src/main.cpp`

## Connections

- Matrix3x3 → Vec3: uses type (evidence: `mathLibCPP/Matrix3x3.h`)
- Matrix4x4 → Vec3: uses type (evidence: `mathLibCPP/Matrix4x4.h`)
- Matrix4x4 → Vec4: uses type (evidence: `mathLibCPP/Matrix4x4.h`)
- SIMD Vec4 Ops → SIMD Vec4 API: implements (evidence: `mathLibSIMD/src/Vec4.cpp`)
- Dot Demo → SIMD Vec4 API: calls dot (evidence: `src/main.cpp`)
- SIMD Vec4 API → SIMD Vec4 Ops: dispatches to (evidence: `mathLibSIMD/src/Vec4.cpp`)
