UNPKG

hyperformula

Version:

HyperFormula is a JavaScript engine for efficient processing of spreadsheet-like data and formulas

18 lines 494 B
/** * @license * Copyright (c) 2025 Handsoncode. All rights reserved. */ import { FunctionArgumentType, FunctionPlugin } from "./FunctionPlugin.mjs"; export class DegreesPlugin extends FunctionPlugin { degrees(ast, state) { return this.runFunction(ast.args, state, this.metadata('DEGREES'), arg => arg * (180 / Math.PI)); } } DegreesPlugin.implementedFunctions = { 'DEGREES': { method: 'degrees', parameters: [{ argumentType: FunctionArgumentType.NUMBER }] } };