aboutsummaryrefslogtreecommitdiff
path: root/src/settings.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2011-03-04 20:02:31 -0800
committerAlon Zakai <azakai@mozilla.com>2011-03-04 20:02:31 -0800
commit1545aaf14f7ce5a92c5acec23687742d0d4fa0ec (patch)
treeeeceb9e8882aac1eaac1068789866ac0c19883c3 /src/settings.js
parent46691ad5cd94f1a629ac747831e9572b3661682e (diff)
integer rounding fixes and CORRECT_ROUNDINGS option
Diffstat (limited to 'src/settings.js')
-rw-r--r--src/settings.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/settings.js b/src/settings.js
index b5be8d3d..ceda7ec8 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -64,6 +64,9 @@ CORRECT_OVERFLOWS = 1; // Experimental code that tries to prevent unexpected JS
// NOTE: You can introduce signing issues by using this option. If you
// take a large enough 32-bit value, and correct it for overflows,
// you may get a negative number, as JS & operations are signed.
+CORRECT_ROUNDINGS = 1; // C rounds to 0 (-5.5 to -5, +5.5 to 5), while JS has no direct way to do that:
+ // Math.floor is to negative, ceil to positive. With CORRECT_ROUNDINGS,
+ // we will do slow but correct C rounding operations.
SHOW_LABELS = 0; // Show labels in the generated code