LibSoftGPU: Use fabsf
instead of fabs
for float
Let's not do a `float -> double -> float` roundtrip. :^)
This commit is contained in:
parent
011f6542db
commit
a5ad702387
Notes:
sideshowbarker
2024-07-17 18:23:56 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/a5ad702387 Pull-request: https://github.com/SerenityOS/serenity/pull/12695 Reviewed-by: https://github.com/Quaker762 ✅ Reviewed-by: https://github.com/linusg ✅ Reviewed-by: https://github.com/sunverwerth ✅
1 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue