Returns magnitude squared of vector (useful for fast comparisons)
| 663 | |
| 664 | // Returns magnitude squared of vector (useful for fast comparisons) |
| 665 | inline constexpr T mag2() const |
| 666 | { |
| 667 | return x * x + y * y; |
| 668 | } |
| 669 | |
| 670 | // Returns normalised version of vector |
| 671 | inline v_2d norm() const |