Formatting numbered variables

Sep 01, 2015

I noticed that references to numbered variables indicate they default to two decimal places when output. Is there a way to change them to whole numbers (no decimal places)?

4 Replies
Alexandros Anoyatis

You can use a Javascript trigger to round out a variable when that variable changes, then copy/paste the trigger and assign it to any other relevant number variables.

However, continuous rounding may lead to incorrect results if the variables change frequently - i.e. Rounded 1.5 + Rounded 1.5 + Rounded 1.5 = 6

So you could either use carry-over variables or just round them out in the end (this depends on what exactly you're going for).

This discussion is closed. You can start a new discussion or contact Articulate Support.