UNPKG

@nodescript/stdlib

Version:
22 lines (21 loc) 487 B
export const module = { version: '1.0.4', moduleName: 'Math / Hypot', description: ` Computes N-dimensional hypothenuse (the square root of the sum of squares). `, params: { values: { schema: { type: 'array', items: { type: 'number' }, }, }, }, result: { schema: { type: 'number' }, } }; export const compute = params => { return Math.hypot(...params.values); };