diff options
author | Alon Zakai <azakai@mozilla.com> | 2011-03-04 20:02:31 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2011-03-04 20:02:31 -0800 |
commit | 1545aaf14f7ce5a92c5acec23687742d0d4fa0ec (patch) | |
tree | eeceb9e8882aac1eaac1068789866ac0c19883c3 /src/preamble.js | |
parent | 46691ad5cd94f1a629ac747831e9572b3661682e (diff) |
integer rounding fixes and CORRECT_ROUNDINGS option
Diffstat (limited to 'src/preamble.js')
-rw-r--r-- | src/preamble.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js index 92997d20..ea0c8fa4 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -118,6 +118,12 @@ var CorrectionsMonitor = { } }; +#if CORRECT_ROUNDINGS +function cRound(x) { + return x >= 0 ? Math.floor(x) : Math.ceil(x); +} +#endif + #if CHECK_OVERFLOWS //======================================== // Debugging tools - Mathop overflows |