https://github.com/masonlet/starletmath
Lightweight header-only math library for Starlet projects
https://github.com/masonlet/starletmath
cpp header-only math opengl starlet vulkan
Last synced: 9 months ago
JSON representation
Lightweight header-only math library for Starlet projects
- Host: GitHub
- URL: https://github.com/masonlet/starletmath
- Owner: Masonlet
- License: mit
- Created: 2025-08-28T02:59:20.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-09-17T21:15:19.000Z (10 months ago)
- Last Synced: 2025-09-17T23:25:39.145Z (10 months ago)
- Topics: cpp, header-only, math, opengl, starlet, vulkan
- Language: C++
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StarletMath
A lightweight header-only math library for **Starlet** projects designed with OpenGL engines in mind.
⚠️ **Note**
This is **NOT** intended to be a complete math library!
It's minimal and straightforward to make the math operations easier to understand and extend.
This makes it perfect for learning, experimentation, but not a drop-in replacement for full-fledged math libraries.
## Features
- Basic vector types: `Vec2`, `Vec3`, `Vec4`
- `Transform` struct for position, rotation, scale
- `Mat4` 4x4 matrix with:
- Identity, transpose, inverse
- Translation, rotation, scaling
- `lookAt` and `perspective` helpers
- Composition with `Transform`
- Constants and helpers:
`pi`, `radians()`, `degrees()`
- **Starlet** Project Constants
## Using as a Dependency
```cmake
include(FetchContent)
FetchContent_Declare(StarletMath GIT_REPOSITORY https://github.com/Masonlet/StarletMath.git GIT_TAG main)
FetchContent_MakeAvailable(StarletMath)
target_link_libraries(YourAppName PRIVATE StarletMath)
```