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

Meta+Userland: Pass Gfx::IntSize by value

Just two ints like Gfx::IntPoint.
This commit is contained in:
MacDue 2022-12-06 21:35:32 +00:00 committed by Andreas Kling
parent e011eafd37
commit 27fae78335
63 changed files with 142 additions and 142 deletions

View file

@ -20,12 +20,12 @@ static float normalized_gradient_angle_radians(float gradient_angle)
return real_angle * (AK::Pi<float> / 180);
}
static float calulate_gradient_length(Gfx::IntSize const& gradient_size, float sin_angle, float cos_angle)
static float calulate_gradient_length(Gfx::IntSize gradient_size, float sin_angle, float cos_angle)
{
return AK::fabs(gradient_size.height() * sin_angle) + AK::fabs(gradient_size.width() * cos_angle);
}
static float calulate_gradient_length(Gfx::IntSize const& gradient_size, float gradient_angle)
static float calulate_gradient_length(Gfx::IntSize gradient_size, float gradient_angle)
{
float angle = normalized_gradient_angle_radians(gradient_angle);
float sin_angle, cos_angle;