From d79a7b76b4263eb9a56779b88ae547891dbbbcd3 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 28 Apr 2020 09:57:32 -0700 Subject: [PATCH] Fixed rounding --- BeefLibs/corlib/src/Math.bf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BeefLibs/corlib/src/Math.bf b/BeefLibs/corlib/src/Math.bf index c7428d01..2654b0f2 100644 --- a/BeefLibs/corlib/src/Math.bf +++ b/BeefLibs/corlib/src/Math.bf @@ -65,10 +65,11 @@ namespace System } else { - // On X86 this can be inlined to just a few instructions + // On X86 this can be inlined to just a few instructions curValue = Round(curValue); } curValue /= power10; + return curValue; } return value; } @@ -90,10 +91,11 @@ namespace System } else { - // On X86 this can be inlined to just a few instructions + // On X86 this can be inlined to just a few instructions curValue = Round(curValue); } curValue /= power10; + return curValue; } return value; }