Implements a pattern scanning feature that allows searching for byte patterns within a byte range.
Adds `scan_for_pattern` method to `PatternScanner` to locate a pattern within a byte span.
Adds corner case tests to verify functionality and handle invalid inputs.
Adds new test cases to cover additional scenarios for pattern scanning, including tests for leading/trailing whitespace and spacing variations to ensure robustness.
Implements a pattern scanner for byte sequence parsing.
Introduces `omath::PatternScanner` to parse pattern strings, which represent byte sequences.
Adds support for wildcard characters ('?' and '?') to represent optional bytes in the pattern.
Includes unit tests for basic read operations to ensure proper functionality.
Removes preprocessor check for FMA instructions in matrix multiplication functions.
This simplifies the code and relies on the compiler's ability to optimize the
code based on available hardware support. The assumption is that modern
compilers will automatically utilize FMA instructions if available, and fall
back to alternative implementations if not.
Ensures that AVX2 intrinsics are only included when the
OMATH_USE_AVX2 preprocessor definition is set. This prevents
compilation errors when AVX2 support is not available or
explicitly disabled.
The C standard library function fmodf is not guaranteed to be in namespace std, and in fact is not with a default Ubuntu 24.04 installation, leading to the following compile error:
```console
Change Dir: '/vcpkg/buildtrees/vcpkg-ci-orange-math/x64-linux-dbg'
Run Build Command(s): /vcpkg/downloads/tools/ninja/1.12.1-linux/ninja -v -v -j33
[1/2] /usr/bin/c++ -DOMATH_SUPRESS_SAFETY_CHECKS -DOMATH_VERSION=\"3.5.0\" -isystem /vcpkg/installed/x64-linux/include -fPIC -g -std=gnu++23 -MD -MT CMakeFiles/main.dir/main.cpp.o -MF CMakeFiles/main.dir/main.cpp.o.d -o CMakeFiles/main.dir/main.cpp.o -c /vcpkg/scripts/test_ports/vcpkg-ci-orange-math/project/main.cpp
FAILED: CMakeFiles/main.dir/main.cpp.o
/usr/bin/c++ -DOMATH_SUPRESS_SAFETY_CHECKS -DOMATH_VERSION=\"3.5.0\" -isystem /vcpkg/installed/x64-linux/include -fPIC -g -std=gnu++23 -MD -MT CMakeFiles/main.dir/main.cpp.o -MF CMakeFiles/main.dir/main.cpp.o.d -o CMakeFiles/main.dir/main.cpp.o -c /vcpkg/scripts/test_ports/vcpkg-ci-orange-math/project/main.cpp
In file included from /vcpkg/installed/x64-linux/include/omath/omath.hpp:22,
from /vcpkg/scripts/test_ports/vcpkg-ci-orange-math/project/main.cpp:1:
/vcpkg/installed/x64-linux/include/omath/color.hpp: In member function ‘constexpr omath::Hsv omath::Color::to_hsv() const’:
/vcpkg/installed/x64-linux/include/omath/color.hpp:98:45: error: ‘fmodf’ is not a member of ‘std’; did you mean ‘modf’?
98 | hsv_data.hue = 60.f * (std::fmodf(((green - blue) / delta), 6.f));
| ^~~~~
| modf
ninja: build stopped: subcommand failed.
```
Only the 'sufficient additional overloads' of `fmod` are guaranteed to be in `std`. Since this is clearly intended to call the (float, float) overload, explicitly cast `((green - blue) / delta)` (which is a `double`) to `float` and call the name in `std` as suggested by the diagnostic.
Optimizes matrix multiplication by specializing the algorithm
based on the matrix storage type (row-major or column-major).
This change significantly improves performance by leveraging
memory access patterns specific to each storage order.
Adds a partial specialization of `std::formatter` for `omath::Angle`
to provide formatting support using `std::format`.
This allows `Angle` objects to be easily formatted as strings,
including degree symbol representation, using standard formatting
techniques.
Fixes a potential type conversion issue by explicitly casting the x-coordinate to float in the world_to_screen test. This prevents possible compiler warnings and ensures the intended behavior.
Adds functionality to convert screen coordinates to world space, including handling for cases where the inverse view projection matrix is singular or when the world position is out of screen bounds.
Also exposes Camera class to unit tests.
Adds an angle class with support for different normalization
and clamping strategies. Includes trigonometric functions and
arithmetic operators. Introduces unit tests to verify correct
functionality.
Disables unity builds to address a compilation issue.
Removes the deprecated `Matrix` class and its associated source files and unit tests.
This change is to ensure code cleanliness and prevent accidental usage of the slow and outdated `Matrix` class.
The `Mat` class should be used instead.
Updates the include paths in omath.hpp to be more explicit,
ensuring correct referencing of header files.
Removes unnecessary include of vector3.hpp from vector2.hpp.
Moves linear algebra headers to a new subdirectory to improve project structure.
Updates includes to reflect the directory change.
Adds vcpkg to the tracked repositories.
Adds functions to generate left- and right-handed orthographic projection matrices.
This provides more flexibility when defining a projection for rendering.
Adds formatters for `omath::Angle` and `omath::Color` to allow for easy formatting using `std::format`.
This allows users to easily output Angle and Color values in a human-readable format.