From a5ad7023872d6db566210a39ef0ef3a94bfb3296 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sun, 23 Jan 2022 20:30:09 +0100 Subject: LibSoftGPU: Use `fabsf` instead of `fabs` for `float` Let's not do a `float -> double -> float` roundtrip. :^) --- Userland/Libraries/LibSoftGPU/Device.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Userland') diff --git a/Userland/Libraries/LibSoftGPU/Device.cpp b/Userland/Libraries/LibSoftGPU/Device.cpp index 4a34cc8146..0737bbc859 100644 --- a/Userland/Libraries/LibSoftGPU/Device.cpp +++ b/Userland/Libraries/LibSoftGPU/Device.cpp @@ -246,9 +246,9 @@ void Device::rasterize_triangle(const Triangle& triangle) // clang-format on // Fog depths - float const vertex0_eye_absz = fabs(vertex0.eye_coordinates.z()); - float const vertex1_eye_absz = fabs(vertex1.eye_coordinates.z()); - float const vertex2_eye_absz = fabs(vertex2.eye_coordinates.z()); + float const vertex0_eye_absz = fabsf(vertex0.eye_coordinates.z()); + float const vertex1_eye_absz = fabsf(vertex1.eye_coordinates.z()); + float const vertex2_eye_absz = fabsf(vertex2.eye_coordinates.z()); int const render_bounds_left = render_bounds.x(); int const render_bounds_right = render_bounds.x() + render_bounds.width(); -- cgit v1.2.3