name:
src/main/js/formulas/math/RAND.ts
-rw-r--r--
496
1import { SheetColumnRowKey } from "../../models/common/SheetColumnRowKey";
2import { Complex } from "../../models/common/Types";
3import { AbstractFormula } from "../AbstractFormula";
4import { FormulaName } from "../FormulaName";
5
6export class RAND extends AbstractFormula {
7 static SELF: RAND = new RAND();
8 NAME = FormulaName.RAND;
9
10 internal(origin: SheetColumnRowKey, ...values: Array<Complex>) {
11 AbstractFormula.checkLength(values.length, 0, this.NAME);
12 return Math.random();
13 }
14}