# techtastic/advanced-math architecture

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

- Interactive diagram: https://gitdiagram.com/techtastic/advanced-math
- Repository: https://github.com/techtastic/advanced-math

## Overview

Advanced Math Library is a small set of independent mathematical libraries for CC: Tweaked. A computer user loads the matrix and quaternion APIs or requires the PID, linear algebra, and statistics modules, then uses the chosen library. The README documents these entry points and capabilities; with no source excerpts available, the graph does not infer internal calls or dependencies between libraries.

Main entry points: [`datapack/data/computercraft/lua/rom/apis/matrix.lua`](https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/apis/matrix.lua) (Matrices), [`datapack/data/computercraft/lua/rom/apis/quaternion.lua`](https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/apis/quaternion.lua) (Quaternions), [`datapack/data/computercraft/lua/rom/modules/main/advanced_math/pid.lua`](https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/modules/main/advanced_math/pid.lua) (PID controllers), [`datapack/data/computercraft/lua/rom/modules/main/advanced_math/mmath.lua`](https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/modules/main/advanced_math/mmath.lua) (Linear algebra)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Computer user"))
node_matrix["Matrices<br/>[matrix.lua]"]
node_quaternion["Quaternions<br/>[quaternion.lua]"]
node_pid["PID controllers<br/>[pid.lua]"]
node_mmath["Linear algebra<br/>[mmath.lua]"]
node_stats["Statistics<br/>[stats.lua]"]

node_user -->|"loads API"| node_matrix
node_user -->|"loads API"| node_quaternion
node_user -->|"requires module"| node_pid
node_user -->|"requires module"| node_mmath
node_user -->|"requires module"| node_stats

click node_matrix "https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/apis/matrix.lua"
click node_quaternion "https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/apis/quaternion.lua"
click node_pid "https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/modules/main/advanced_math/pid.lua"
click node_mmath "https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/modules/main/advanced_math/mmath.lua"
click node_stats "https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/modules/main/advanced_math/stats.lua"

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_user toneBlue
class node_matrix,node_quaternion,node_pid,node_mmath,node_stats toneTeal
```

## Components

### Other components

- **Computer user**
- [Matrices](https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/apis/matrix.lua): `datapack/data/computercraft/lua/rom/apis/matrix.lua`
- [Quaternions](https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/apis/quaternion.lua): `datapack/data/computercraft/lua/rom/apis/quaternion.lua`
- [PID controllers](https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/modules/main/advanced_math/pid.lua): `datapack/data/computercraft/lua/rom/modules/main/advanced_math/pid.lua`
- [Linear algebra](https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/modules/main/advanced_math/mmath.lua): `datapack/data/computercraft/lua/rom/modules/main/advanced_math/mmath.lua`
- [Statistics](https://github.com/techtastic/advanced-math/blob/main/datapack/data/computercraft/lua/rom/modules/main/advanced_math/stats.lua): `datapack/data/computercraft/lua/rom/modules/main/advanced_math/stats.lua`

## Connections

- Computer user → Matrices: loads API
- Computer user → Quaternions: loads API
- Computer user → PID controllers: requires module
- Computer user → Linear algebra: requires module
- Computer user → Statistics: requires module
