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
Big Thanks to your answer!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.