diff --git a/src/NRandom/Collections/WeightedList.cs b/src/NRandom/Collections/WeightedList.cs index b9d3ba3..269e5c6 100644 --- a/src/NRandom/Collections/WeightedList.cs +++ b/src/NRandom/Collections/WeightedList.cs @@ -107,6 +107,7 @@ public void Add(T value, double weight) public void Clear() { list.Clear(); + totalWeight = 0.0; } public bool Contains(WeightedValue item)