From 01b1efe9eec9877a409d14f749b9934a10224a58 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Mon, 12 Sep 2016 18:44:04 +0200 Subject: [PATCH] Switch from abs to fabs --- src/g_shared/sbarinfo_commands.cpp | 4 ++-- src/v_video.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/g_shared/sbarinfo_commands.cpp b/src/g_shared/sbarinfo_commands.cpp index 47785076e..b7827f6bd 100644 --- a/src/g_shared/sbarinfo_commands.cpp +++ b/src/g_shared/sbarinfo_commands.cpp @@ -1949,10 +1949,10 @@ class CommandAspectRatio : public SBarInfoCommandFlowControl }; int ratio = ratioTypes[0].second; - float distance = abs(ratioTypes[0].first - aspect); + float distance = fabs(ratioTypes[0].first - aspect); for (int i = 1; ratioTypes[i].first != 0.0f; i++) { - float d = abs(ratioTypes[i].first - aspect); + float d = fabs(ratioTypes[i].first - aspect); if (d < distance) { ratio = ratioTypes[i].second; diff --git a/src/v_video.cpp b/src/v_video.cpp index 43458dc63..20e1f526c 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -1681,10 +1681,10 @@ int CheckRatio (int width, int height, int *trueratio) }; int ratio = ratioTypes[0].second; - float distance = abs(ratioTypes[0].first - aspect); + float distance = fabs(ratioTypes[0].first - aspect); for (int i = 1; ratioTypes[i].first != 0.0f; i++) { - float d = abs(ratioTypes[i].first - aspect); + float d = fabs(ratioTypes[i].first - aspect); if (d < distance) { ratio = ratioTypes[i].second;