Core: Replace C math headers with C++ equivalents #104386
Open
+430
−523
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ABS
in favor ofMath::abs
#69406Math
functions where possible #96498One of the discussions in the
Math::abs
PR noted that we were still using the C API for quite a lot of our math operations, rather than C++ bindings. This PR makes the first major step to remedy this, by expungingmath.h
from the core entirely—in favor ofcmath
. It may persist via third-party includes, but ideally this will allow us to transition to the more modern syntax & better evaluate the areas of code that were using those C-headers instead of our math header.Note that, in constrast to #96498, this simply elevates the global functions to the
std
namespace, NOT theMath
class. Trying to integrate everything intoMath
would require more invasive changes, and ultimately the priority was deprecating the C-Header, so that can be addressed in a followup PR.