summaryrefslogtreecommitdiff
path: root/game/network/link.cpp
blob: ad09341c7bd7083b3e540efd1ca401a162441721 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "link.h"
#include <compare>
#include <tuple>

Link::Link(End a, End b, float l) : ends {{std::move(a), std::move(b)}}, length {l} { }

bool
operator<(const glm::vec3 & a, const glm::vec3 & b)
{
	// NOLINTNEXTLINE(hicpp-use-nullptr,modernize-use-nullptr)
	return std::tie(a.x, a.z, a.y) < std::tie(b.x, b.z, b.y);
}

bool
operator<(const Node & a, const Node & b)
{
	return a.pos < b.pos;
}