BLI_math: avoid assert with non-finite numbers

This commit is contained in:
Campbell Barton 2018-04-23 21:07:27 +02:00
parent 53d69e6d04
commit 92f36586e3
Notes: blender-bot 2023-02-14 05:58:19 +01:00
Referenced by issue #55172, Hair is dynamic even it is disabled
Referenced by issue #55024, Smoke simulation crash Blender
Referenced by issue #54801, Transparency artifacts in latest build
1 changed files with 2 additions and 2 deletions

View File

@ -240,7 +240,7 @@ void BLI_bitmap_draw_2d_tri_v2i(
float inv_slope1 = inv_slope(p2, p1);
float inv_slope2 = inv_slope(p3, p1);
ORDER_VARS2(float, inv_slope1, inv_slope2);
BLI_assert(inv_slope1 <= inv_slope2);
BLI_assert(!(inv_slope1 > inv_slope2));
draw_tri_flat_max(
p1, p2[1],
inv_slope1, inv_slope2,
@ -251,7 +251,7 @@ void BLI_bitmap_draw_2d_tri_v2i(
float inv_slope1 = inv_slope(p3, p1);
float inv_slope2 = inv_slope(p3, p2);
ORDER_VARS2(float, inv_slope2, inv_slope1);
BLI_assert(inv_slope1 >= inv_slope2);
BLI_assert(!(inv_slope1 < inv_slope2));
draw_tri_flat_min(
p3, p2[1] + 1, /* avoid overlap */
inv_slope1, inv_slope2,