Fix vecr::bbox in case of infinite bboxes to prevent NaN's
This commit is contained in:
parent
703ba37394
commit
3570cb4fea
2 changed files with 6 additions and 0 deletions
|
|
@ -40,6 +40,9 @@ namespace psemek::vecr
|
|||
{
|
||||
auto sbox = bbox(s.shape);
|
||||
|
||||
if (!geom::isfinite(sbox))
|
||||
return geom::box<float, 2>::full();
|
||||
|
||||
geom::box<float, 2> result = sbox;
|
||||
|
||||
for (int x = 0; x <= 1; ++x)
|
||||
|
|
|
|||
|
|
@ -129,6 +129,9 @@ namespace psemek::vecr
|
|||
{
|
||||
auto sbox = bbox(s.shape);
|
||||
|
||||
if (!geom::isfinite(sbox))
|
||||
return geom::box<float, 2>::full();
|
||||
|
||||
geom::box<float, 2> result;
|
||||
|
||||
for (int y = 0; y <= 1; ++y)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue