From 78069349601edfec9068d24f24ef01cf7d2e06b4 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 14 May 2022 16:24:18 +0200 Subject: [PATCH] [MIRROR] Protect against floating-point inaccuracy in log() [MDB IGNORE] (#13600) * Protect against floating-point inaccuracy in log() (#66875) This was causing issues with indexing icon slots (the main user of TOBITSHIFT). See BeeStation/BeeStation-Hornet#6842 for more details. Probably fixes #66197 and fixes #65652. (In all my tests, I could never get anything to show in suit_storage, whereas those bugs are reporting intermittent issues.) Originally made for BeeStation/BeeStation-Hornet#6842 (which also affects TG). * Protect against floating-point inaccuracy in log() Co-authored-by: David Walker --- code/__DEFINES/maths.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/maths.dm b/code/__DEFINES/maths.dm index b4de855bef9..cd75a7a0172 100644 --- a/code/__DEFINES/maths.dm +++ b/code/__DEFINES/maths.dm @@ -117,7 +117,8 @@ #define TORADIANS(degrees) ((degrees) * 0.0174532925) /// Gets shift x that would be required the bitflag (1<