(params: [IFormulaParam<number>, IFormulaParam<number>])
| 226 | } |
| 227 | |
| 228 | static override func(params: [IFormulaParam<number>, IFormulaParam<number>]): NumericType { |
| 229 | const value = params[0].value; |
| 230 | if (value == null) { |
| 231 | return null; |
| 232 | } |
| 233 | const num = Number(value); |
| 234 | const precision = params[1] && Math.floor(params[1].value) || 0; |
| 235 | const offset = Math.pow(10, precision); |
| 236 | return divide(Math.round(times(num, offset)), offset); |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | export class Max extends NumericFunc { |