29#define __WIZARD_ENGINE_INTERNAL__
34 return sqrtf(powf(x, 2) + powf(y, 2));
42 if ((
bool)x || (
bool)y) {
44 return {x / length, y / length};
50 return length * cosf(angle);
54 return length * sinf(angle);
59 float cosine_scale{cosf(angle) * scale};
60 float sine_scale{sinf(angle) * scale};
61 return {cosine_scale, -sine_scale, sine_scale, cosine_scale};
65std::mt19937_64 wze::math::_mt19937_64{std::random_device{}()};
static float angle(float x, float y)
Returns the angle of a vector.
static std::array< float, 4 > transformation_matrix(float angle, float scale)
Creates a transformation matrix.
static float move_y(float length, float angle)
Moves the y component of a vector.
static std::pair< float, float > normalize(float x, float y)
Normalizes a vector.
static float move_x(float length, float angle)
Moves the x component of a vector.
static float length(float x, float y)
Returns the length of a vector.