MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / r

Method r

src/main/java/com/volmit/adapt/util/M.java:146–152  ·  view source on GitHub ↗

Get true or false based on random percent @param d between 0 and 1 @return true if true

(Double d)

Source from the content-addressed store, hash-verified

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

Callers 7

onMethod · 0.95
onMethod · 0.95
onTickMethod · 0.95
onTickMethod · 0.95
getArmorMethod · 0.95
updateHeatMethod · 0.95
hitMethod · 0.95

Calls 1

randomMethod · 0.80

Tested by

no test coverage detected