2 of 2 people found this helpful
What exactly does 'two digits' mean to you?
The number you say you need is a floating point number having a variable number of digits.How this number is displayed, is controlled by the visualization and/or the PI Points DisplayDigits setting.
If you round to two digits, then the value is rounded to two digits. But beware the syntax: the Round function uses to second argument as: "The size of the unit to round to"
So if i use Round(1.2345,0.01) the output is 1.23
1 of 1 people found this helpful
Just to clarify because Roger Palmen did provide a good answer. Both Roundfrac and Round will round a number. If only 1 argument is provided to Round, then its rounds to an integer. If 2 arguments are provided to Round, it will round to the specified precision.
Note that Roundfrac(number, 2) actually calls Round(number, 0.01). They are equivalent statements.
And you are not truncating to 2 digits. You are indeed rounding with no more than 2 digits. There is a difference.
There are 2 functions to round as well well as another function to truncate. The Trunc function is takes same inputs as Round, so usage is similar to what Roger Palmen posted. There is also a Roundfrac(number, digits) function.
Rounding down looks same as Trunc:
Rounding up is different from Trunc:
Thank you for all answers.
I used the "Roundfrac" function and it's works excellent.
Thanks and regards.