37 #define M_PI 3.14159265358979323846f
50 return sqrtf((point2.
x - point1.
x) * (point2.
x - point1.
x) + (point2.
y - point1.
y) * (point2.
y - point1.
y));
79 return rand() /
float(RAND_MAX);
88 return M_PI * degrees / 180.0f;
A 2D floating point vector.
float uniformRandomNumber()
Generate random number in the 0.0 to 1.0 range.
float distanceBetweenPoints(const Vec2f &point1, const Vec2f &point2)
Compute Euclidean 2-dimensional distance between two points on XY plane.
float signum(float f)
Get the sign of a number.
#define M_PI
The value of pi.
float degreesToRadians(float degrees)
Convert an angle in degrees to radians.