private static Decimal randDecimal ( Decimal min , Decimal max ) { Decimal randomDecimal = null ; if ( min != null && max != null && min . isLessThan ( max ) ) { randomDecimal = max . minus ( min ) . multipliedBy ( Decimal . valueOf ( Math . random ( ) ) ) . plus ( min ) ; } return randomDecimal ; }
Generates a random decimal number between min and max .