Skip to content

Commit

Permalink
Fix does not need fabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Nov 27, 2024
1 parent b8f8dbd commit 506d193
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/gfx/pal_packing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <algorithm>
#include <deque>
#include <inttypes.h>
#include <math.h>
#include <optional>
#include <queue>
#include <type_traits>
Expand Down Expand Up @@ -486,8 +485,7 @@ std::tuple<DefaultInitVec<size_t>, size_t>
maxSize,
maxRelSize
);
if (fabs(minSize * maxRelSize - maxSize * minRelSize)
< fabs(minRelSize * maxRelSize) * .001) {
if (maxSize * minRelSize - minSize * maxRelSize < minRelSize * maxRelSize * .001) {
options.verbosePrint(
Options::VERB_TRACE,
" All efficiencies are identical\n"
Expand Down Expand Up @@ -535,7 +533,7 @@ std::tuple<DefaultInitVec<size_t>, size_t>
if (iter == assignments.end()) { // No such page, create a new one
options.verbosePrint(
Options::VERB_DEBUG,
"Adding new palette (%zu) for overflowing proto-pal %zu\n",
"Adding new palette (%zu) for overflowing proto-palette %zu\n",
assignments.size(),
attrs.protoPalIndex
);
Expand Down

0 comments on commit 506d193

Please sign in to comment.