You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Remove ABS in favor of Math::abs
This commit is contained in:
@@ -1453,10 +1453,10 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontAdvanced *p_f
|
||||
|
||||
if (FT_HAS_COLOR(fd->face) && fd->face->num_fixed_sizes > 0) {
|
||||
int best_match = 0;
|
||||
int diff = ABS(fd->size.x - ((int64_t)fd->face->available_sizes[0].width));
|
||||
int diff = Math::abs(fd->size.x - ((int64_t)fd->face->available_sizes[0].width));
|
||||
fd->scale = double(fd->size.x * fd->oversampling) / fd->face->available_sizes[0].width;
|
||||
for (int i = 1; i < fd->face->num_fixed_sizes; i++) {
|
||||
int ndiff = ABS(fd->size.x - ((int64_t)fd->face->available_sizes[i].width));
|
||||
int ndiff = Math::abs(fd->size.x - ((int64_t)fd->face->available_sizes[i].width));
|
||||
if (ndiff < diff) {
|
||||
best_match = i;
|
||||
diff = ndiff;
|
||||
|
||||
Reference in New Issue
Block a user