Rounding Numbers the Easy Way

  • 10 favourites

Stats

693 visits, 868 views

Translations

This tutorial hasn't been translated.

Tools

This tutorial explains how to round a value to a specific number of decimal places.

A simple way to round the value is by multiplying the number by a set amount, rounding it, and then dividing it by that same amount.

(round(variableToRound * 1000)) / 1000

The number of 0's (three in the example above) determines the number of decimal places your rounded text will ultimately display.

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!