1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:57:34 +00:00

AK: Add to_radians and to_degrees math functions

This commit is contained in:
Bastiaan van der Plaat 2023-09-09 14:43:39 +02:00 committed by Sam Atkins
parent 9b7aa8f6b6
commit 494a8cb816
15 changed files with 40 additions and 40 deletions

View file

@ -145,7 +145,7 @@ void GLContext::gl_rotate(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
FloatVector3 axis = { x, y, z };
if (axis.length() > 0.f)
axis.normalize();
auto rotation_mat = Gfx::rotation_matrix(axis, angle * static_cast<float>(M_PI * 2 / 360));
auto rotation_mat = Gfx::rotation_matrix(axis, AK::to_radians(angle));
update_current_matrix(*m_current_matrix * rotation_mat);
}