Skip to content

Home

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...


๐Ÿš€ Quick Start

New to OMath? Start here:

Quick example:

#include <omath/omath.hpp>

using namespace omath;

Vector3<float> a{1, 2, 3};
Vector3<float> 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

๐Ÿ“š Documentation Structure

Core Mathematics

Linear Algebra - Vector2 - 2D vectors with full operator support - Vector3 - 3D vectors, dot/cross products, angles - Vector4 - 4D vectors (homogeneous coordinates) - Mat4X4 - 4ร—4 matrices for transformations - Triangle - Triangle primitive and utilities

Trigonometry - Angle - Strong-typed angle system with range enforcement - Angles - Angle utilities and conversions - View Angles - Pitch/Yaw/Roll for camera systems

3D Primitives - Box - Axis-aligned bounding boxes - Plane - Infinite planes and intersections

Game Development Features

Projection & Camera - Camera - Generic camera system with engine traits - Error Codes - Projection error handling

Collision Detection - Line Tracer - Ray-triangle, ray-plane intersections

Projectile Prediction - Projectile Engine Interface - Base interface - Projectile - Projectile properties - Target - Target state representation - Legacy Engine - Standard implementation - AVX2 Engine - Optimized implementation

Pathfinding - A* Algorithm - A* pathfinding implementation - Navigation Mesh - Triangle-based navigation

Game Engine Support

OMath provides built-in support for multiple game engines with proper coordinate system handling:

Source Engine (Valve - CS:GO, TF2, etc.) - Camera Trait - Pred Engine Trait - Constants - Formulas

Unity Engine - Camera Trait - Pred Engine Trait - Constants - Formulas

Unreal Engine (Epic Games) - Camera Trait - Pred Engine Trait - Constants - Formulas

Frostbite Engine (EA - Battlefield, etc.) - Camera Trait - Pred Engine Trait - Constants - Formulas

IW Engine (Infinity Ward - Call of Duty) - Camera Trait - Pred Engine Trait - Constants - Formulas

OpenGL Engine (Canonical OpenGL) - Camera Trait - Pred Engine Trait - Constants - Formulas

Utilities

Color - Color - RGBA color with conversions

Pattern Scanning & Memory - Pattern Scan - Binary pattern search with wildcards - PE Pattern Scan - PE file pattern scanning

Reverse Engineering - External Rev Object - External process memory access - Internal Rev Object - Internal memory access


โœจ Key Features

  • Efficiency: Optimized for performance, ensuring quick computations using AVX2.
  • Versatility: Includes a wide array of mathematical functions and algorithms.
  • Ease of Use: Simplified interface for convenient integration into various projects.
  • Projectile Prediction: Projectile prediction engine with O(N) algo complexity, that can power you projectile aim-bot.
  • 3D Projection: No need to find view-projection matrix anymore you can make your own projection pipeline.
  • Collision Detection: Production ready code to handle collision detection by using simple interfaces.
  • No Additional Dependencies: No additional dependencies need to use OMath except unit test execution
  • Ready for meta-programming: Omath use templates for common types like Vectors, Matrixes etc, to handle all types!
  • Engine support: Supports coordinate systems of Source, Unity, Unreal, Frostbite, IWEngine and canonical OpenGL.
  • Cross platform: Supports Windows, MacOS and Linux.
  • Algorithms: Has ability to scan for byte pattern with wildcards in PE files/modules, binary slices, works even with Wine apps.

๐Ÿ“– Common Use Cases

World-to-Screen Projection

Project 3D world coordinates to 2D screen space for ESP overlays, UI elements, or visualization.

Projectile Prediction

Calculate aim points for moving targets considering projectile speed, gravity, and target velocity.

Collision Detection

Perform ray-casting, line tracing, and intersection tests for hit detection and physics.

Pattern Scanning

Search for byte patterns in memory for reverse engineering, modding, or tool development.

Pathfinding

Find optimal paths through 3D spaces using A* algorithm and navigation meshes.



Youtube Video


APEX Preview


BO2 Preview


CS2 Preview


TF2 Preview




๐Ÿค Community & Support


๐Ÿ’ก Contributing

OMath is open source and welcomes contributions! See CONTRIBUTING.md for guidelines.


Last updated: 1 Nov 2025