More bounding boxes

This commit is contained in:
Godzil
2020-02-28 18:33:59 +00:00
parent b4ae737b40
commit 307c125eba
19 changed files with 92 additions and 55 deletions

View File

@@ -56,7 +56,6 @@ void Tuple::fixPoint()
void Tuple::fixVector()
{
if (isnan(this->x) || isnan(this->y) || isnan(this->z))
{
/* w is probably broken, so fix it */
@@ -66,5 +65,6 @@ void Tuple::fixVector()
bool Tuple::isRepresentable()
{
return !(isnan(this->x) || isnan(this->y) || isnan(this->z));
return !(isnan(this->x) || isnan(this->y) || isnan(this->z) ||
isinf(this->x) || isinf(this->y) || isinf(this->z));
}