aboutsummaryrefslogtreecommitdiffstats
path: root/stats/statshelper.cpp
blob: b08c120770922f03cfef611cc5f7160e513c9826 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: GPL-2.0

#include "statshelper.h"
#include "core/dive.h"

#include <cmath>

QPointF roundPos(const QPointF &p)
{
	return QPointF(round(p.x()), round(p.y()));
}

bool allDivesSelected(const std::vector<dive *> &dives)
{
	return std::all_of(dives.begin(), dives.end(),
			   [] (const dive *d) { return d->selected; });
}