@@ -11,11 +11,11 @@ Coordinate Coordinate::operator+(const Coordinate& obj) const {
1111}
1212
1313Coordinate Coordinate::operator +(const Coordinate2D& obj) const {
14- Coordinate result;
15- result.x = this ->x + obj.x ;
16- result.y = this ->y ;
17- result.z = this ->z + obj.z ;
18- return result;
14+ Coordinate result;
15+ result.x = this ->x + obj.x ;
16+ result.y = this ->y ;
17+ result.z = this ->z + obj.z ;
18+ return result;
1919}
2020
2121bool Coordinate::operator ==(const Coordinate& obj) const {
@@ -53,30 +53,26 @@ std::ostream& operator<<(std::ostream& out, const Coordinate& coord) {
5353 return out;
5454}
5555
56- Coordinate Coordinate2D::with_height (int y) const {
57- return Coordinate (this ->x , y, this ->z );
58- }
56+ Coordinate Coordinate2D::with_height (int y) const { return Coordinate (this ->x , y, this ->z ); }
5957
6058Coordinate2D Coordinate2D::operator +(const Coordinate2D& obj) const {
61- Coordinate2D result;
62- result.x = this ->x + obj.x ;
63- result.z = this ->z + obj.z ;
64- return result;
59+ Coordinate2D result;
60+ result.x = this ->x + obj.x ;
61+ result.z = this ->z + obj.z ;
62+ return result;
6563}
6664
6765bool Coordinate2D::operator ==(const Coordinate2D& obj) const {
68- return (this ->x == obj.x ) && (this ->z == obj.z );
66+ return (this ->x == obj.x ) && (this ->z == obj.z );
6967}
7068
71- bool Coordinate2D::operator !=(const Coordinate2D& obj) const {
72- return !(*this == obj);
73- }
69+ bool Coordinate2D::operator !=(const Coordinate2D& obj) const { return !(*this == obj); }
7470
7571Coordinate2D Coordinate2D::operator -(const Coordinate2D& obj) const {
76- Coordinate2D result;
77- result.x = this ->x - obj.x ;
78- result.z = this ->z - obj.z ;
79- return result;
72+ Coordinate2D result;
73+ result.x = this ->x - obj.x ;
74+ result.z = this ->z - obj.z ;
75+ return result;
8076}
8177
8278std::size_t Coordinate2D::operator ()(const mcpp::Coordinate2D& obj) const {
@@ -90,12 +86,12 @@ std::size_t Coordinate2D::operator()(const mcpp::Coordinate2D& obj) const {
9086}
9187
9288std::string to_string (const Coordinate2D& coord) {
93- using std::to_string;
94- return " (" + to_string (coord.x ) + " ," + to_string (coord.z ) + " )" ;
89+ using std::to_string;
90+ return " (" + to_string (coord.x ) + " ," + to_string (coord.z ) + " )" ;
9591}
9692
9793std::ostream& operator <<(std::ostream& out, const Coordinate2D& coord) {
98- out << to_string (coord);
99- return out;
94+ out << to_string (coord);
95+ return out;
10096}
10197} // namespace mcpp
0 commit comments