zarqon
Well-known member
I was just trying to think of ease of use for the user, and percents are something everyone understands the bounds of, rather than an arbitrary range like 1-8. Perhaps go with an int and include "percent" in the name -- this is consistent with other areas of mafia. Then I would express it as:
minmax(low + ((high-low)*mlDangerPercent)/100, low, high)
Ok, I cheated and used minmax rather than min and max, but you get the idea. This way you can get away with using all ints.
minmax(low + ((high-low)*mlDangerPercent)/100, low, high)
Ok, I cheated and used minmax rather than min and max, but you get the idea. This way you can get away with using all ints.