Get true or false based on random percent @param d between 0 and 1 @return true if true
(Double d)
| 144 | * @return true if true |
| 145 | */ |
| 146 | public static boolean r(Double d) { |
| 147 | if (d == null) { |
| 148 | return Math.random() < 0.5; |
| 149 | } |
| 150 | |
| 151 | return Math.random() < d; |
| 152 | } |
| 153 | |
| 154 | /** |
| 155 | * Get the ticks per second from a time in nanoseconds, the rad can be used for |