fixdecimal
v1.0.2
Published
The fixdecimal package provides an extended rounding and decimal digit fixing solution in JavaScript.This Package allows to handle floating number operations precisely and effiently.
Downloads
12
Maintainers
Readme
fixDecimal
example
//Rounding to given decimal digits
const yourFloatNumber=1234.3461045234;
const result=fixdecimal(yourFloatNumber,4); // Output: 1234.3461
Overview
The fixdecimal package will help you to fix your digits after decimal point.
Installation
To install the fixdecimal
package, you can use the following npm command:
npm install fixdecimal
Usage
Here is the basic example of using the fixdecimal
package:
//first parameter is your number and the second parameter is how many digits you want after decimal.
const fixdecimal=require('fixdecimal');
const yourFloatNumber=187634.347654334;
const result=fixdecimal(yourFloatNumber,2); // Output: 187634.34