From 8df4a72aaa1a209ddd8b39eb9466512342a02252 Mon Sep 17 00:00:00 2001 From: Michael Mclaughlin Date: Thu, 18 Feb 2016 19:56:50 +0000 Subject: [PATCH] bitwise floor ok --- decimal.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/decimal.js b/decimal.js index 41f51f1..8346fc7 100644 --- a/decimal.js +++ b/decimal.js @@ -3123,8 +3123,7 @@ j = i - LOG_BASE + digits; // Get the rounding digit at index j of w. - // Floor using Math.floor instead of | 0 as rd may be outside int range. - rd = j < 0 ? 0 : mathfloor(w / mathpow(10, digits - j - 1) % 10); + rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0; } }