diff options
Diffstat (limited to 'Source/Core/Common/Src/MathUtil.cpp')
| -rw-r--r-- | Source/Core/Common/Src/MathUtil.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/Common/Src/MathUtil.cpp b/Source/Core/Common/Src/MathUtil.cpp index 88e929ec41..afd1e3e2cb 100644 --- a/Source/Core/Common/Src/MathUtil.cpp +++ b/Source/Core/Common/Src/MathUtil.cpp @@ -111,6 +111,17 @@ void MatrixMul(int n, const float *a, const float *b, float *result) } } +// Calculate sum of a float list +float MathFloatVectorSum(std::vector<float> Vec) +{ + float Sum = 0.0; + for(int i = 0; i < Vec.size(); i++) + { + Sum += Vec.at(i); + } + return Sum; +} + void Matrix33::LoadIdentity(Matrix33 &mtx) { memset(mtx.data, 0, sizeof(mtx.data)); |
