Search code snippets, questions, articles...

Remove decimal points in numbers

Math.trunc(inputnumber) //truncate fractional part, also see below
Math.floor(inputnumber) //round down
Math.ceil(inputnumber) //round up
Math.round(inputnumber) //round to nearest integer

Search Index Data (The code snippet can also be found with below search text)

Decimal
Round off
Remove decimal point
Was this helpful?
0 Comments
Programming Feeds
Learn something new everyday on Devsheet