| MyMath.java |
/*
* Created by IntelliJ IDEA.
* User: lyon
* Date: Feb 15, 2003
* Time: 1:22:04 PM
*/
package utils;
public class MyMath {
public static int getRandom() {
return (int) ((Math.random() * 100) + 1);
}
// return a random int between min and max, inclusive.
public static int rand(int min, int max) {
return (int) (Math.floor(
Math.random() * (max - min) + min) + 1);
}
public static boolean odd(int i) {
if ((i & 1) == 1) return true;
return false;
}
}