UNPKG

@ppramanik62/lab-works

Version:

A comprehensive command-line toolkit for hydraulic turbine calculations, supporting Francis Turbine and Pelton Wheel computations with interactive mode and validation.

28 lines 750 B
"use strict"; /** * Utility functions for number rounding and formatting */ Object.defineProperty(exports, "__esModule", { value: true }); exports.formatNumber = exports.roundTo = exports.threeDecimal = void 0; /** * Round number to three decimal places */ const threeDecimal = (num) => { return Number(num.toFixed(3)); }; exports.threeDecimal = threeDecimal; /** * Round number to specified decimal places */ const roundTo = (num, decimals) => { return Number(num.toFixed(decimals)); }; exports.roundTo = roundTo; /** * Format number for display with consistent decimal places */ const formatNumber = (num, decimals = 3) => { return num.toFixed(decimals); }; exports.formatNumber = formatNumber; //# sourceMappingURL=round.js.map