3#include <box2d/box2d.h>
17static constexpr float pi = B2_PI;
18static constexpr float circle_divisor = 180.0f;
64 float height)
noexcept;
Represents a point in 2D space.
Definition point.h:6
Represents a 3D vector with x, y, and z components. This class provides basic vector operations such ...
Definition vector3.h:8
Namespace containing mathematical utility functions for physics calculations.
Definition physics_math.h:16
float to_meters(float pixels, float ratio) noexcept
Convert pixels to meters using the specified ratio.
float convert_box2d_angle_to_radians(float sine, float cosine) noexcept
Convert Box2D angle representation (sine, cosine) to radians.
float to_radians(float degrees) noexcept
Convert degrees to radians.
float to_degrees(float radians) noexcept
Convert radians to degrees.
float dy_between_points(const Point &a, const Point &b) noexcept
Calculate the difference in y-coordinates between two 2D points.
float pixels_to_box2d(float length) noexcept
Convert length from pixels to Box2D units.
Vector3 box2d_vec_to_pixel_vec3(const Vector3 &v, bool to_pixels=true)
Convert a Vector3 to Box2D vector representation.
float convert_radians_to_box2d_cosine(float radians) noexcept
Convert radians to Box2D cosine value.
float box2d_to_pixels(float length) noexcept
Convert length from Box2D units to pixels.
Vector3 physics_vec3_to_transform_pixel_vec3(const Vector3 &v, float width, float height) noexcept
Convert physics Vector3 to transform pixel Vector3.
float convert_radians_to_box2d_sine(float radians) noexcept
Convert radians to Box2D sine value.
float distance_between_points(const Point &a, const Point &b) noexcept
Calculate the distance between two 2D points.
Vector3 vec3_to_box2d_vec3(const Vector3 &v, bool from_pixels=true)
Convert a Box2D vector representation to Vector3.
float to_pixels(float meters, float ratio) noexcept
Convert meters to pixels using the specified ratio.
float dx_between_points(const Point &a, const Point &b) noexcept
Calculate the difference in x-coordinates between two 2D points.