1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 19:37:35 +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

@ -30,7 +30,7 @@ public:
private:
static FloatMatrix3x3 calculate_hue_rotate_matrix(float angle_degrees)
{
float const angle_rads = angle_degrees * (AK::Pi<float> / 180.0f);
float const angle_rads = AK::to_radians(angle_degrees);
float cos_angle = 0.;
float sin_angle = 0.;
AK::sincos(angle_rads, sin_angle, cos_angle);