Merge pull request #308 from cp89gamedev/fix-broken-test

fix for broken math test
This commit is contained in:
Chomp
2025-05-29 21:19:55 +01:00
committed by GitHub
2 changed files with 7 additions and 1 deletions
@@ -16,6 +16,12 @@ public class MathUtil
return values.Sum();
}
public float ListSum(List<float> values)
{
// Sum the list starting with an initial value of 0
return values.Sum();
}
/// <summary>
/// Helper to create the cumulative sum of all list elements
/// ListCumSum([1, 2, 3, 4]) = [1, 3, 6, 10]
+1 -1
View File
@@ -10,7 +10,7 @@ public class MathUtilTests
[TestMethod]
public void ListSumTest()
{
var test = new List<double>
var test = new List<float>
{
1.1f,
2.1f,