new coord stuff from 09

This commit is contained in:
Eric Mertens
2023-01-23 14:46:01 -06:00
parent a6d7a81ce1
commit e67df73b3a
2 changed files with 12 additions and 0 deletions

View File

@@ -73,6 +73,10 @@ auto Norm1(Coord c) -> std::int64_t {
return std::abs(c.x) + std::abs(c.y);
}
auto NormInf(Coord c) -> std::int64_t {
return std::max(std::abs(c.x), std::abs(c.y));
}
auto operator+(Coord a, Coord b) -> Coord {
return {a.x + b.x, a.y + b.y};
}