Releases: mackysoft/Choice
Releases · mackysoft/Choice
1.2.3
1.2.2
Removed
- Removed
WeightedSelectMethodTests.CompareAllMethod
.
Changed
AliasWeightedSelectMethod
is now an internal sealed class.- In
WeightedSelectMethodTests
,XXX_ReturnValidValue_0
andXXX_ReturnValidValue_1
now test withIsNotNull
instead ofAreSame
. - The weights of items generated by the
ItemEnumerableGenerator
now include 0.
Fixed
- Fixed
IndexOutOfRangeException
being thrown when all weights passed toAliasWeightedSelectMethod
are the same.
1.2.1
Added
- Added
WeightedSelectMethodSpeedTests
.
Changed
- Optimized the setup of
AliasWeightedSelectMethod
.
1.2.0
1.1.0
Added
- Added
IWeightedSelectMethod.Calculate
method.- This allows the results of the pre-calculation to be cached, resulting in improved performance.
- Added
CompareAllMethods
test.- All implemented
IWeightedSelectMethod
s must return the same result.
- All implemented
1.0.0
Added
- Added the
IWeightedSelector<T>
andWeightedSelector<T>
. - Added an unit tests.
Changes
- Renamed the
ToReadOnlyWeightedSelector
method toToWeightedSelector
. - Renamed the
SelectItem
method that usedUnityEngine.Random.value
toSelectItemWithUnityRandom
. - All WeightedSelectMethods now support weights less than or equal to 0.
- IWeightedSelectMethod now takes a TemporaryArray as an argument instead of a float[].
Fixes
- Fixed a fatal bug that prevented BinaryWeightedSelectMethod from working.