Adapted the accumulate function to return float.
This commit is contained in:
parent
b8f943e73c
commit
dece6c6bc8
|
@ -21,7 +21,7 @@ namespace Pinetime {
|
|||
}
|
||||
|
||||
float GetAverage() const {
|
||||
float sum = std::accumulate(arr.begin(), arr.end(), 0);
|
||||
float sum = std::accumulate(arr.begin(), arr.end(), 0.0f);
|
||||
return (sum / sz);
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@ namespace Pinetime {
|
|||
uint8_t cap;
|
||||
uint8_t loc;
|
||||
};
|
||||
|
||||
class Battery {
|
||||
public:
|
||||
void Init();
|
||||
|
|
Loading…
Reference in New Issue
Block a user