1.0.1 • Published 4 years ago

floor-to-precision v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Floor To Precision

Floor a give number at a position

Installation


npm install --save floor-to-precision

Usage

const floorToPrecision = require('floor-to-precision')

floorToPrecision(-12489.9482, 5); // 12489.9482
floorToPrecision(-12489.9482, 4); // 12489.9482
floorToPrecision(-12489.9482, 3); // 12489.948
floorToPrecision(-12489.9482, 2); // 12489.94
floorToPrecision(-12489.9482, 1); // 12489.9
floorToPrecision(-12489.9482, 0); // 12489
floorToPrecision(-12489.9482, -1); // 12480
floorToPrecision(-12489.9482, -2); // 12400
floorToPrecision(-12489.9482, -3); // 12000
floorToPrecision(-12489.9482, -4); // 10000
floorToPrecision(-12489.9482, -5); // 0

License

floorToPrecision is copyright (c) 2019-present Yatish Balaji yatishmotamarri@yahoo.com and the contributors to floorToPrecision.

floorToPrecision is free software, licensed under the MIT License. See the LICENSE file for more details.