From 12ab2a57381a35d62efc685f3a54ee7b9f0e3617 Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Wed, 20 Jul 2011 14:08:41 -0400 Subject: [PATCH] continuing to debug falling rain world program --- js-assembler/runtime-src/baselib-check.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js-assembler/runtime-src/baselib-check.js b/js-assembler/runtime-src/baselib-check.js index b289259..b94daf8 100644 --- a/js-assembler/runtime-src/baselib-check.js +++ b/js-assembler/runtime-src/baselib-check.js @@ -152,10 +152,12 @@ var checkNaturalInRange = makeCheckParameterizedArgumentType( function(x, a, b) { - return plt.baselib.numbers.isNatural(x) && - } + if (! plt.baselib.numbers.isNatural(x)) { return false; } + return (plt.baselib.numbers.lessThanOrEqual(a, x) && + plt.baselib.numbers.lessThan(x, b)); + }, function(a, b) { - return plt.baselib.format('natural between ~a and ~a', [a, b]) + return plt.baselib.format('natural between ~a and ~a', [a, b]); }); var checkInteger = makeCheckArgumentType(