Skip to content

Releases: mackysoft/Choice

1.2.3

27 Oct 16:34
Compare
Choose a tag to compare

Changed

  • Update Unity from 2020.3.14f1 to 2021.3.12f1.

Fixed

  • Fixed IndexOutOfRangeException in EnumerableConversion.

1.2.2

02 Aug 19:23
Compare
Choose a tag to compare

Removed

  • Removed WeightedSelectMethodTests.CompareAllMethod.

Changed

  • AliasWeightedSelectMethod is now an internal sealed class.
  • In WeightedSelectMethodTests, XXX_ReturnValidValue_0 and XXX_ReturnValidValue_1 now test with IsNotNull instead of AreSame.
  • The weights of items generated by the ItemEnumerableGenerator now include 0.

Fixed

  • Fixed IndexOutOfRangeException being thrown when all weights passed to AliasWeightedSelectMethod are the same.

1.2.1

31 Jul 14:19
Compare
Choose a tag to compare

Added

  • Added WeightedSelectMethodSpeedTests.

Changed

  • Optimized the setup of AliasWeightedSelectMethod.

1.2.0

30 Jul 14:45
Compare
Choose a tag to compare

Added

  • Added alias method and tests.
    • This is a very effective algorithm for selecting multiple items.

1.1.0

16 May 17:37
Compare
Choose a tag to compare

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 IWeightedSelectMethods must return the same result.

1.0.0

01 Feb 14:15
Compare
Choose a tag to compare

Added

  • Added the IWeightedSelector<T> and WeightedSelector<T>.
  • Added an unit tests.

Changes

  • Renamed the ToReadOnlyWeightedSelector method to ToWeightedSelector.
  • Renamed the SelectItem method that used UnityEngine.Random.value to SelectItemWithUnityRandom.
  • 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.

0.1.0

19 Jan 13:51
Compare
Choose a tag to compare
Added WeightedSelector.Empty<T>()