summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx/Painter.cpp
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-07-05 18:56:06 +0200
committerGunnar Beutner <gunnar@beutner.name>2021-07-08 10:11:00 +0200
commitf14a4994b0496191bd202099b620723cb0e497f7 (patch)
treed9234f1bc38d0189c513a7b7ca3ba995aa3183ad /Userland/Libraries/LibGfx/Painter.cpp
parent01a0aa6e0b059b8bf7d258d5025109cc31fd004b (diff)
downloadserenity-f14a4994b0496191bd202099b620723cb0e497f7.zip
Everywhere: Don't promote float to double where not needed
The `float => double => float` round trip seen in a couple of places might pessimize the code. Even if it's truncated to an int in the end, it's weird not to use the functions with the `f` suffixes when working with single precision floats.
Diffstat (limited to 'Userland/Libraries/LibGfx/Painter.cpp')
-rw-r--r--Userland/Libraries/LibGfx/Painter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp
index 5985a4aa3c..d3bf8cb921 100644
--- a/Userland/Libraries/LibGfx/Painter.cpp
+++ b/Userland/Libraries/LibGfx/Painter.cpp
@@ -1902,7 +1902,7 @@ void Painter::for_each_line_segment_on_elliptical_arc(const FloatPoint& p1, cons
if (theta_delta < 0) {
swap(start, end);
theta_1 = theta_1 + theta_delta;
- theta_delta = fabs(theta_delta);
+ theta_delta = fabsf(theta_delta);
}
auto relative_start = start - center;