13 const float PPM = 30.0f;
14 const float PI = 3.1415;
44 constexpr T
degToRad (
const T &x) {
return PI * x / 180.0; };
54 constexpr T
radToDeg (
const T &x) {
return 180.0 * x /
PI; }
Convert the units from Box2D units to SFML units and vice-versa.
Definition: Converter.hpp:12
constexpr T radToDeg(const T &x)
Convert the unit from radians to degrees.
Definition: Converter.hpp:54
constexpr T degToRad(const T &x)
Convert the unit from degrees to radians.
Definition: Converter.hpp:44
constexpr T pixelsToMeters(const T &x)
Convert the unit from pixels to meters.
Definition: Converter.hpp:24
const float PPM
Definition: Converter.hpp:13
constexpr T metersToPixels(const T &x)
Convert the unit from meters to pixels.
Definition: Converter.hpp:34
const float PI
Definition: Converter.hpp:14