You are viewing a single comment's thread from:

RE: Calculating a user's Steemit reputation score in JavaScript [bonus content: an Angular Pipe that does it for you]

in #steemdev8 years ago

Yeah, or something like this:

function toPrecision(value, precision) {
    const multiplier = Math.pow(10, precision);
    return Math.floor(value * multiplier) / multiplier;
}

Coin Marketplace

STEEM 0.09
TRX 0.32
JST 0.034
BTC 109571.98
ETH 3845.07
USDT 1.00
SBD 0.60