Releases: mackysoft/Choice
Releases · mackysoft/Choice
1.2.3
1.2.2
Removed
- Removed
WeightedSelectMethodTests.CompareAllMethod.
Changed
AliasWeightedSelectMethodis now an internal sealed class.- In
WeightedSelectMethodTests,XXX_ReturnValidValue_0andXXX_ReturnValidValue_1now test withIsNotNullinstead ofAreSame. - The weights of items generated by the
ItemEnumerableGeneratornow include 0.
Fixed
- Fixed
IndexOutOfRangeExceptionbeing thrown when all weights passed toAliasWeightedSelectMethodare the same.
1.2.1
Added
- Added
WeightedSelectMethodSpeedTests.
Changed
- Optimized the setup of
AliasWeightedSelectMethod.
1.2.0
1.1.0
Added
- Added
IWeightedSelectMethod.Calculatemethod.- This allows the results of the pre-calculation to be cached, resulting in improved performance.
- Added
CompareAllMethodstest.- All implemented
IWeightedSelectMethods must return the same result.
- All implemented
1.0.0
Added
- Added the
IWeightedSelector<T>andWeightedSelector<T>. - Added an unit tests.
Changes
- Renamed the
ToReadOnlyWeightedSelectormethod toToWeightedSelector. - Renamed the
SelectItemmethod that usedUnityEngine.Random.valuetoSelectItemWithUnityRandom. - 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.