LibSoftGPU: Use fabsf instead of fabs for float

Let's not do a `float -> double -> float` roundtrip. :^)
This commit is contained in:
Jelle Raaijmakers 2022-01-23 20:30:09 +01:00 committed by Linus Groh
parent 011f6542db
commit a5ad702387
Notes: sideshowbarker 2024-07-17 18:23:56 +09:00

View file

@ -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();