name:
src/main/js/formulas/math/COSH.ts
-rw-r--r--
641
1import { SheetColumnRowKey } from "../../models/common/SheetColumnRowKey";
2import { Complex } from "../../models/common/Types";
3import { Converters } from "../../utils/Converters";
4import { AbstractFormula } from "../AbstractFormula";
5import { FormulaName } from "../FormulaName";
6
7export class COSH extends AbstractFormula {
8 static SELF: COSH = new COSH();
9 NAME = FormulaName.COSH;
10
11 internal(origin: SheetColumnRowKey, ...values: Array<Complex>) {
12 AbstractFormula.checkLength(values.length, 1, this.NAME);
13 return Math["cosh"](
14 Converters.toNumber(Converters.first(this.collateralLookup(origin, values[0])))
15 );
16 }
17}