Files
omath/docs/index.md
2025-11-01 09:51:38 +00:00

8.8 KiB
Raw Blame History

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

Projectile Prediction

Pathfinding

Game Engine Support

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

Source Engine (Valve - CS:GO, TF2, etc.)

Unity Engine

Unreal Engine (Epic Games)

Frostbite Engine (EA - Battlefield, etc.)

IW Engine (Infinity Ward - Call of Duty)

OpenGL Engine (Canonical OpenGL)

Utilities

Color

  • Color - RGBA color with conversions

Pattern Scanning & Memory

Reverse Engineering


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