MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / polar

Method polar

olcPixelGameEngine.h:726–729  ·  view source on GitHub ↗

Treat this as cartesian coordinate (X, Y), return polar equivalent (R, Theta)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

v_2dClass · 0.70

Tested by

no test coverage detected