Merge pull request #76 from ScottLogic/maths-fix
Adds floor, ceiling math functions
This commit is contained in:
commit
318f5833bf
1 changed files with 2 additions and 0 deletions
|
@ -100,6 +100,8 @@ Primitives.prototype.primMathFunction = function(b) {
|
|||
case 'log': return Math.log(n) / Math.LN10;
|
||||
case 'e ^': return Math.exp(n);
|
||||
case '10 ^': return Math.exp(n * Math.LN10);
|
||||
case 'floor': return Math.floor(n);
|
||||
case 'ceiling': return Math.ceil(n);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Reference in a new issue