Add round function

This commit is contained in:
syuilo 2019-12-20 02:09:51 +09:00
parent 9bc07c1a1c
commit 1eb5578063
3 changed files with 6 additions and 0 deletions

View file

@ -162,6 +162,7 @@ export class ASEvaluator {
multiply: (a: number, b: number) => a * b,
divide: (a: number, b: number) => a / b,
mod: (a: number, b: number) => a % b,
round: (a: number) => Math.round(a),
strLen: (a: string) => a.length,
strPick: (a: string, b: number) => a[b - 1],
strReplace: (a: string, b: string, c: string) => a.split(b).join(c),