Treat this as cartesian coordinate (X, Y), return polar equivalent (R, Theta)
| 724 | |
| 725 | // Treat this as cartesian coordinate (X, Y), return polar equivalent (R, Theta) |
| 726 | inline constexpr v_2d polar() const |
| 727 | { |
| 728 | return v_2d(mag(), std::atan2(y, x)); |
| 729 | } |
| 730 | |
| 731 | // Clamp the components of this vector in between the 'element-wise' minimum and maximum of 2 other vectors |
| 732 | inline constexpr v_2d clamp(const v_2d& v1, const v_2d& v2) const |