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

Method cart

olcPixelGameEngine.h:720–723  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

718
719 // Treat this as polar coordinate (R, Theta), return cartesian equivalent (X, Y)
720 inline constexpr v_2d cart() const
721 {
722 return v_2d(std::cos(y) * x, std::sin(y) * x);
723 }
724
725 // Treat this as cartesian coordinate (X, Y), return polar equivalent (R, Theta)
726 inline constexpr v_2d polar() const

Callers

nothing calls this directly

Calls 1

v_2dClass · 0.70

Tested by

no test coverage detected