Negates the vector. Equivalent to a reflection across the `y = -x` line. */
| 204 | Equivalent to a reflection across the `y = -x` line. |
| 205 | */ |
| 206 | Vec neg() const { |
| 207 | return Vec(-x, -y); |
| 208 | } |
| 209 | Vec plus(Vec b) const { |
| 210 | return Vec(x + b.x, y + b.y); |
| 211 | } |