UNPKG
fly-js
Version:
latest (0.0.5)
0.0.5
0.0.4
0.0.3
A JavaScript utility library focusing on aviation
github.com/rheh/fly-js
rheh/fly-js
fly-js
/
src
/
helpers
/
math
/
Rounder.js
12 lines
(8 loc)
•
238 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
/*jslint node: true */
"use strict"
;
var
Rounder
=
function
(
) { };
Rounder
.
prototype
.
round
=
function
(
value, roundTo
) {
return
Math
.
round
(value *
Math
.
pow
(
10
, roundTo)) /
Math
.
pow
(
10
, roundTo); };
module
.
exports
=
new
Rounder
();