public static String percent ( EvaluationContext ctx , Object number ) { BigDecimal percent = Conversions . toDecimal ( number , ctx ) . multiply ( new BigDecimal ( 100 ) ) ; return Conversions . toInteger ( percent , ctx ) + "%" ; }
Formats a number as a percentage