mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibGfx: Pass angles as floats to Path::elliptical_arc_to()
These are stored as floats internally and other parameters are FloatPoints, so taking doubles is a little inconsistent. Doubles are needed for the endpoint -> center parametrization conversion, but that does not need exposing in the API.
This commit is contained in:
@@ -14,15 +14,15 @@
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
void Path::elliptical_arc_to(FloatPoint point, FloatSize radii, double x_axis_rotation, bool large_arc, bool sweep)
|
||||
void Path::elliptical_arc_to(FloatPoint point, FloatSize radii, float x_axis_rotation, bool large_arc, bool sweep)
|
||||
{
|
||||
auto next_point = point;
|
||||
|
||||
double rx = radii.width();
|
||||
double ry = radii.height();
|
||||
|
||||
double x_axis_rotation_c = AK::cos(x_axis_rotation);
|
||||
double x_axis_rotation_s = AK::sin(x_axis_rotation);
|
||||
double x_axis_rotation_c = AK::cos(static_cast<double>(x_axis_rotation));
|
||||
double x_axis_rotation_s = AK::sin(static_cast<double>(x_axis_rotation));
|
||||
|
||||
// Find the last point
|
||||
FloatPoint last_point { 0, 0 };
|
||||
|
||||
Reference in New Issue
Block a user