Hey Everyone,
I want to edit a user macro in confluence server. The result is a number which is at the moment shown as e.g.: 0.01683053094893694
Is there anyone who can tell me, how i get this number shortened to 0.01? (2 decimals )
Hi @Cocorisu
Do you need to calculate with this value?
Unfortunately, the mathtool of velocity isn't integrated in confluence server. So here is a hack solution with strings.
#set ($number = 0.0012346815154)
$number
<br>
$number.toString().substring(0,4)
Regards, Dominic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.