summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Common/MathUtilTest.cpp
AgeCommit message (Collapse)Author
2025-05-16UnitTests: Remove redundant template type specifersDr. Dystopia
2024-06-09Add some unit tests for the `Rectangle` classNiel Lebeck
2023-04-15Common/MathUtil: Move IntLog2 into MathUtil namespaceLioncash
Gets this out of the global namespace.
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-04-06MathUtil: Add SaturatingCast to cast floats more safelyLéo Lam
2019-05-04Replace MathUtil::Clamp with std::clampLéo Lam
2018-06-12UnitTests: Fix MSVC compilationspycrab
2018-05-10CommonFuncs: Convert ROUND_UP_POW2 macro to a functionLioncash
Also move it to MathUtils where it belongs with the rest of the power-of-two functions. This gets rid of pollution of the current scope of any translation unit with b<value> macros that aren't intended to be used directly.
2018-05-07Common: Move floating-point utility functions to FloatUtils.h/.cppLioncash
Keeps all of the floating-point utility functions in their own file to keep them all together. This also provides a place for other general-purpose floating-point functions to be added in the future, which will be necessary when improving the flag-setting within the interpreter.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-04-03MathUtilTest: Fix tests on MSVC - Document compiler bugLioncash
MSVC's implementation of numeric_limits currently generates incorrect signaling NaNs. The resulting values are actually quiet NaNs instead. This commit is based off of a solution by shuffle2. The only difference is a template specialization for floats is also added to cover all bases
2015-08-21MathUtil: Remove IsNAN and IsINFLioncash
These aren't necessary, since the stdlib provides equivalents.
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-03-01Fix include order of files outside of Source/CoreTillmann Karras
2014-09-08Rename Log2 and add IsPow2 to MathUtils for future useFiora
Also remove unused pow2/pow2f functions.
2014-09-05Revert "JIT64: optimize CA calculations"Fiora
2014-09-01Rename Log2 and add IsPow2 to MathUtils for future useFiora
Also remove unused pow2/pow2f functions.
2014-09-01unittests: correct some integers which should have been floating point typesShawn Hoffman
2014-07-15Fix incorrect clamping in SWRenderer.Scott Mansell
A previous PR changed a whole lot of min/maxes to std::min/std::max but made a mistake here and used a templated min which cast it's arguments to unsigned instead of casting return value. This resulted in glitchy artifacts in bright areas (See issue 7439) I rewrote the code to use a proper clamping function so it's cleaner to read.
2014-03-24MathUtilTest: add test for FlushToZeroTillmann Karras
2014-03-09MathUtil: fix IsQNAN()Tillmann Karras
The constants were one nibble too short and the lower 51 bits don't actually have to be zero.
2014-03-09Add more tests for Common and Core/MMIOPierre Bourdon