From a7d6bd8ef3c681158453094348202cd62958d780 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Sun, 15 Nov 2020 19:25:46 +0100 Subject: [PATCH] fixed keyboard formula input for "neg" --- HISTORY.md | 3 ++- src/objects.js | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 200367f2..d1b00d9d 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,12 +4,13 @@ * **Notable Fixes:** * fixed a costume fitting issue, thanks, Joan! - * fixed keyboard formula input for "power of" + * fixed keyboard formula input for "power of" and "neg" ### 2020-11-15 * new dev version * objects: fixed costume fitting, thanks, Joan! * objects: fixed keyboard formula input for "power of" +* objects: fixed keyboard formula input for "neg" ## 6.3.2 * **Notable Changes:** diff --git a/src/objects.js b/src/objects.js index f98f493d..e615ea0f 100644 --- a/src/objects.js +++ b/src/objects.js @@ -3398,11 +3398,12 @@ SpriteMorph.prototype.reporterize = function (expressionString) { round: 'reportRound', not: 'reportNot' }; - monads = ['abs', 'ceiling', 'floor', 'sqrt', 'sin', 'cos', 'tan', - 'asin', 'acos', 'atan', 'ln', 'log', 'round', 'not']; + monads = ['abs', 'neg', 'ceiling', 'floor', 'sqrt', 'sin', 'cos', + 'tan', 'asin', 'acos', 'atan', 'ln', 'log', 'round', 'not']; alias = { ceil: 'ceiling', - '!' : 'not' + '!' : 'not', + '-' : 'neg' }; monads.concat(['true', 'false']).forEach(word => reverseDict[localize(word).toLowerCase()] = word