Closed hamtaren closed 3 years ago
Thanks for the report! I made this extensions for MinMaxInt and blindly copypasted them for MinMaxFloat. RandomInRangeInclusive for MinMaxFloat is removed (since it's inclusive already) and summary changed for MinMaxFloat.RandomInRange accordingly
Hi, I got mislead a little, by
RandomInRange(this MinMaxFloat minMax)
andRandomInRangeInclusive(this MinMaxFloat minMax)
effects and comments in summary.Since
Random.Range
(while usingfloat
) is [minInclusive..maxInclusive] andint
[minInclusive..maxExclusive] when I got my minMax set: min: 0.75f, max: 1.0f I got output range from: 0.75f to 2.0f while usingRandomInRangeInclusive(this MinMaxFloat minMax)
. I know the intentions behind it, especialy for theints
, but forfloats
comment inRandomInRange's
summary is misleading:I don't know how it could be done better, I thought I'd just report this, because it might be tricky to change
RandomInRange
intoRandomInRangeExclusive
andRandomInRangeInclusive
intoRandomInRange
.