Difference between revisions of "Talk:GetRandomPercent"
Jump to navigation
Jump to search
no edit summary
imported>JOG |
imported>JOG |
||
Line 46: | Line 46: | ||
int(1 + 0.06 * '''99''') = int(1 + 5.94) = int(6.94) = '''6''' => Chance: 16% | int(1 + 0.06 * '''99''') = int(1 + 5.94) = int(6.94) = '''6''' => Chance: 16% | ||
And the Min/Max formula was wrong: | |||
short dice | |||
set dice to 5/99 * GetRandompercent | |||
would return this: | |||
int(5/99 * '''00''') = int(0.00) = '''0''' | |||
int(5/99 * '''19''') = int(0.96) = '''0''' => Chance: 20% | |||
int(5/99 * '''20''') = int(1.01) = '''1''' | |||
int(5/99 * '''39''') = int(1.98) = '''1''' => Chance: 20% | |||
int(5/99 * '''40''') = int(2.02) = '''2''' | |||
int(5/99 * '''59''') = int(2.98) = '''2''' => Chance: 20% | |||
int(5/99 * '''60''') = int(3.03) = '''3''' | |||
int(5/99 * '''79''') = int(3.99) = '''3''' => Chance: 20% | |||
int(5/99 * '''80''') = int(4.04) = '''4''' | |||
int(5/99 * '''98''') = int(4.98) = '''4''' => Chance: 19% | |||
int(5/99 * '''99''') = int(5.00) = '''5''' => Chance: 1% |