2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "Common/MathUtil.h"
|
|
|
|
|
2019-01-29 22:05:51 +00:00
|
|
|
#include <numeric>
|
2009-04-19 10:10:45 +00:00
|
|
|
|
2009-06-15 04:30:02 +00:00
|
|
|
// Calculate sum of a float list
|
2009-07-28 07:40:18 +00:00
|
|
|
float MathFloatVectorSum(const std::vector<float>& Vec)
|
2009-06-15 04:30:02 +00:00
|
|
|
{
|
2009-07-28 07:40:18 +00:00
|
|
|
return std::accumulate(Vec.begin(), Vec.end(), 0.0f);
|
2009-06-15 04:30:02 +00:00
|
|
|
}
|