Adds less than, greater than, less than or equal, and greater than or equal operators to the Vector2, Vector3 and Vector4 classes.
The comparison is based on the lengths of the vectors.
Adds corresponding unit tests.
Removes the virtual destructor from the Camera class as it is not required,
as the class does not act as a base class. This simplifies the class
definition and avoids potential vtable overhead.
Moves camera and prediction engine implementations into traits for each engine,
decoupling the engine-specific logic from the core classes, promoting code reuse
and maintainability. This change allows for easier addition of new engines and
customization of existing ones.
Removes the projectile.cpp file. The removal indicates that the associated projectile prediction functionality is no longer needed or has been moved elsewhere.
Introduces a CONTRIBUTING.MD file to provide guidelines for
contributing to the project, including prerequisites, setup
instructions, pull request workflow, code style, and building
instructions.
xd
returned back
patch
Ensures type safety in Vector2, Vector3, and Vector4 operations by using static_cast(0) instead of relying on implicit conversions.
This prevents potential issues with different numeric types.
Adds from_im_vec2 and from_im_vec4 methods for creating vectors from ImVec2/ImVec4 types.
Implements engine-specific traits for projectile and target position prediction.
Each trait encapsulates logic tailored to a specific game engine (IW, OpenGL, Unity),
accounting for engine-specific coordinate systems and calculations.
This allows for accurate projectile prediction across different game environments.
Moves target prediction logic into engine traits, improving modularity.
This change consolidates target position prediction within the engine traits,
allowing for a more flexible and maintainable design.
This eliminates redundant code and simplifies the core prediction engine by
delegating target movement calculations to the appropriate trait.
Implements a direct pitch angle calculation for scenarios with zero gravity, ensuring accurate projectile trajectory predictions in such conditions.
Also marks several methods as noexcept for better performance and exception safety.
Excludes the vcpkg directory from being tracked by Git.
This prevents accidental commits of external library files
managed by vcpkg, keeping the repository cleaner.
Migrates projectile prediction logic to leverage engine traits for improved flexibility and testability.
This change decouples core prediction algorithms from specific engine implementations, allowing for easier adaptation to different game engines or simulation environments.
Refactors the projectile prediction engine by introducing an interface
and making the legacy implementation more flexible.
The legacy engine is updated to allow for coordinate system customization
through virtual methods, enabling usage in different game environments.
Also introduces vcpkg support for easier dependency management and adds boost-asio as a dependency.
Adds a comment documenting the formula used for calculating the projectile launch pitch angle.
The comment includes a link to the Stack Overflow discussion where the formula was found and the LaTeX representation of the formula for clarity.
The changes encapsulate the matrix tests within an `#ifdef` block, allowing conditional compilation based on whether `OMATH_ENABLE_LEGACY` is defined. This enables the legacy code to be compiled only when needed.
Introduces a CMake option to enable legacy classes,
allowing for backward compatibility with older code.
This ensures that older codebases can still function
while new development can utilize updated classes.
Updates the CMake export target and namespace to use the project name,
improving consistency and avoiding naming conflicts.
Adds a simple diagram to the triangle header file.
Updates the CMakeLists.txt to use the project name as the library target name instead of hardcoding "omath".
This change ensures consistency and avoids potential conflicts when integrating the library into other projects.
It also aligns the target naming with CMake best practices.