修复:eval2生成代码丢失

This commit is contained in:
ChenX
2023-09-12 17:22:44 +08:00
parent 05589d99d5
commit 9c91cdaec4
1952 changed files with 113 additions and 21248 deletions

View File

@@ -2165,6 +2165,58 @@ function eval2(expr, params, defaultParam) {
MathUtils.degToRad;
MathUtils.RAD2DEG;
MathUtils.DEG2RAD;
//eval_gen_code
let abs = Math.abs;
let acos = Math.acos;
let acosh = Math.acosh;
let asin = Math.asin;
let asinh = Math.asinh;
let atan = Math.atan;
let atanh = Math.atanh;
let atan2 = Math.atan2;
let ceil = Math.ceil;
let cbrt = Math.cbrt;
let expm1 = Math.expm1;
let clz32 = Math.clz32;
let cos = Math.cos;
let cosh = Math.cosh;
let exp = Math.exp;
let floor = Math.floor;
let fround = Math.fround;
let hypot = Math.hypot;
let imul = Math.imul;
let log = Math.log;
let log1p = Math.log1p;
let log2 = Math.log2;
let log10 = Math.log10;
let max = Math.max;
let min = Math.min;
let pow = Math.pow;
let random = Math.random;
let round = Math.round;
let sign = Math.sign;
let sin = Math.sin;
let sinh = Math.sinh;
let sqrt = Math.sqrt;
let tan = Math.tan;
let tanh = Math.tanh;
let trunc = Math.trunc;
let E = Math.E;
let LN10 = Math.LN10;
let LN2 = Math.LN2;
let LOG10E = Math.LOG10E;
let LOG2E = Math.LOG2E;
let PI = Math.PI;
let SQRT1_2 = Math.SQRT1_2;
let SQRT2 = Math.SQRT2;
let clamp = CLAMP;
let eq = equaln;
let r2d = MathUtils.radToDeg;
let d2r = MathUtils.degToRad;
let R2D = MathUtils.RAD2DEG;
let D2R = MathUtils.DEG2RAD;
let fix = FixedNotZero;
//eval_gen_code
let code = "";
if (params)
for (let name in params)