2016-01
This commit is contained in:
@@ -95,6 +95,22 @@ auto operator-=(Coord & a, Coord b) -> Coord & {
|
||||
return a;
|
||||
}
|
||||
|
||||
auto operator*(Coord a, std::int64_t b) -> Coord {
|
||||
return a *= b;
|
||||
}
|
||||
|
||||
auto operator*(std::int64_t a, Coord b) -> Coord {
|
||||
b.x *= a;
|
||||
b.y *= a;
|
||||
return b;
|
||||
}
|
||||
|
||||
auto operator*=(Coord & a, std::int64_t b) -> Coord & {
|
||||
a.x *= b;
|
||||
a.y *= b;
|
||||
return a;
|
||||
}
|
||||
|
||||
auto operator<<(std::ostream & out, Coord c) -> std::ostream & {
|
||||
return out << "(" << c.x << "," << c.y << ")";
|
||||
}
|
||||
|
Reference in New Issue
Block a user