View Javadoc
1   // %1126721046276:hoplugins.commons.utils%
2   package hoplugins.commons.utils;
3   
4   
5   /***
6    * Math Utility Class
7    *
8    * @author <a href=mailto:draghetto@users.sourceforge.net>Massimiliano Amato</a>
9    */
10  public final class MathUtil {
11      /***
12       * Private default constuctor to prevent class instantiation.
13       */
14      private MathUtil() {
15      }
16  
17      /***
18       * Method to generate a random integer, from 0 to number-1
19       *
20       * @param number Multiplier for randomizer.
21       *
22       * @return random integer number
23       */
24      public static int random(int number) {
25          return (int) (Math.random() * number);
26      }
27  }