Use slightly cleaner double.intValue() for random