I can't find a way to round a number to a specific number of decimals. So e.g. 3.14159 to 3.1416 or 3.14
I'm surely missing something. Any ideas where to find that function?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Chris,
We use round, but have to extend the number past the decimal range first because our round() feature only rounds to the nearest integer.
Using this method on 3.14159 i get
The formulas to handle this look like this:
So, again , you round the number multiplied by the factor of the digits you want then divide the newly rounded integer by the same factor
formatNumber under math functions. ~Jeff
Views
Replies
Total Likes
Hi @Jeff Rieth‚ thanks for the answer. I tried that but it just cuts off at the defined decimal number, it doesn't round :-(
Views
Replies
Total Likes
Hi Chris,
We use round, but have to extend the number past the decimal range first because our round() feature only rounds to the nearest integer.
Using this method on 3.14159 i get
The formulas to handle this look like this:
So, again , you round the number multiplied by the factor of the digits you want then divide the newly rounded integer by the same factor
@Andy Hess‚ thanks for the solution! Perhaps it makes sense that this finds its way into the documentation?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies