mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:07:45 +00:00
AK: Remove rarely used ExtraMathConstants.h
This commit is contained in:
parent
a1f17bd643
commit
5870a1a9a1
7 changed files with 5 additions and 22 deletions
|
@ -5,7 +5,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/ExtraMathConstants.h>
|
||||
#include <LibWeb/HTML/Canvas/CanvasPath.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
@ -60,7 +59,7 @@ WebIDL::ExceptionOr<void> CanvasPath::ellipse(float x, float y, float radius_x,
|
|||
if (radius_y < 0)
|
||||
return WebIDL::IndexSizeError::create(m_self->realm(), MUST(String::formatted("The minor-axis radius provided ({}) is negative.", radius_y)));
|
||||
|
||||
if (constexpr float tau = M_TAU; (!counter_clockwise && (end_angle - start_angle) >= tau)
|
||||
if (constexpr float tau = M_PI * 2; (!counter_clockwise && (end_angle - start_angle) >= tau)
|
||||
|| (counter_clockwise && (start_angle - end_angle) >= tau)) {
|
||||
start_angle = 0;
|
||||
// FIXME: elliptical_arc_to() incorrectly handles the case where the start/end points are very close.
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/ExtraMathConstants.h>
|
||||
#include <AK/QuickSort.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibGfx/AffineTransform.h>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/ExtraMathConstants.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <LibGfx/Path.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
|
@ -162,7 +161,7 @@ Gfx::Path path_from_path_instructions(ReadonlySpan<PathInstruction> instructions
|
|||
case PathInstructionType::EllipticalArc: {
|
||||
double rx = data[0];
|
||||
double ry = data[1];
|
||||
double x_axis_rotation = double { data[2] } * M_DEG2RAD;
|
||||
double x_axis_rotation = AK::to_radians(static_cast<double>(data[2]));
|
||||
double large_arc_flag = data[3];
|
||||
double sweep_flag = data[4];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue