equal
deleted
inserted
replaced
60 this->y /= d; |
60 this->y /= d; |
61 } |
61 } |
62 T length() const { |
62 T length() const { |
63 return sqrt(x*x+y*y); |
63 return sqrt(x*x+y*y); |
64 } |
64 } |
|
65 _Vector roundToInt() const { |
|
66 return _Vector((int)x, (int)y); |
|
67 } |
65 }; |
68 }; |
66 |
69 |
67 template<typename T> |
70 template<typename T> |
68 bool operator==(const _Vector<T> &v1, const _Vector<T> &v2) { |
71 bool operator==(const _Vector<T> &v1, const _Vector<T> &v2) { |
69 return ((v1.x == v2.x) && (v1.y == v2.y)); |
72 return ((v1.x == v2.x) && (v1.y == v2.y)); |