mirror of
https://github.com/slendidev/smath.git
synced 2025-12-13 05:09:53 +02:00
master
Signed-off-by: Slendi <slendi@socopon.com>
smath
Single-file, header-only linear algebra math library for C++23.
Features
- Generic
Vec<N, T>class with useful aliasesVec2/Vec3/Vec4and friendly accessors (x/y/z/w,r/g/b/a). They support approx-equal and tuple/structured bindings. std::formatsupport.- Compile-time swizzles via
swizzle<"...">. - Generic matrix
Matclass with useful aliasesMat2/Mat3/Mat4. Quaternion<T>built onVec4.- Angle helpers
rad/deg/turnsrespecting a configurable base unit via the macroSMATH_ANGLE_UNIT. - Optional implicit conversions.
- Packing utilities for normalized RGBA (
pack_unorm4x8,unpack_snorm4x8, etc.).
License
This library is licensed under the Apache License 2.0. See the (LICENSE.txt)[LICENSE.txt] file for more details.
Description
Languages
C++
88.1%
CMake
6.3%
Nix
5.6%