Skip to content

Commit

Permalink
FIX pctf precision
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Feb 4, 2025
1 parent fc4dfee commit c28c072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dn/RandomTools.hx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class RandomTools {

/** Return TRUE if a random percentage (ie. 0-1) is below given threshold **/
public static inline function pctf(thresholdOrBelow:Float) {
return Std.random(100) < thresholdOrBelow*100;
return Std.random(10000) < thresholdOrBelow*10000;
}


Expand Down

0 comments on commit c28c072

Please sign in to comment.