diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2022-01-23 20:30:09 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-02-22 23:48:59 +0000 |
commit | a5ad7023872d6db566210a39ef0ef3a94bfb3296 (patch) | |
tree | 178ab1c9accc3ddad5df17e742626a1d9097e2b6 /Userland/Libraries/LibSoftGPU | |
parent | 011f6542db1c349868550653f96fed685a40861b (diff) | |
download | serenity-a5ad7023872d6db566210a39ef0ef3a94bfb3296.zip |
LibSoftGPU: Use `fabsf` instead of `fabs` for `float`
Let's not do a `float -> double -> float` roundtrip. :^)
Diffstat (limited to 'Userland/Libraries/LibSoftGPU')
-rw-r--r-- | Userland/Libraries/LibSoftGPU/Device.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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(); |