GitHub - orange-cpp/omath: Cross-platform modern general purpose math library written in C++23 that suitable for cheat/game development. (original) (raw)
OMath is a 100% independent, constexpr template blazingly fast math library that doesn't have legacy C++ code.
It provides the latest features, is highly customizable, has all for cheat development, DirectX/OpenGL/Vulkan support, premade support for different game engines, much more constexpr stuff than in other libraries and more...
Install Examples Documentation Contribute Donate
#include <omath/omath.hpp>
using namespace omath;
// 3D vector operations Vector3 a{1, 2, 3}; Vector3 b{4, 5, 6};
auto dot = a.dot(b); // 32.0 auto cross = a.cross(b); // (-3, 6, -3) auto distance = a.distance_to(b); // ~5.196 auto normalized = a.normalized(); // Unit vector
// World-to-screen projection (Source Engine example) using namespace omath::source_engine; Camera camera(position, angles, viewport, fov, near_plane, far_plane);
if (auto screen = camera.world_to_screen(world_position)) { // Draw at screen->x, screen->y }
