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