Trying to fix coverage.

This commit is contained in:
Godzil
2020-02-22 18:21:30 +00:00
parent 56095169eb
commit 9c35cfc4f3
5 changed files with 63 additions and 12 deletions

View File

@@ -46,6 +46,7 @@ public:
double_equal(this->emissive, b.emissive) &&
double_equal(this->refractiveIndex, b.refractiveIndex) &&
(this->colour == b.colour); };
bool operator!=(const Material &b) const { return !(*this == b); };
};

View File

@@ -26,6 +26,7 @@ public:
double_equal(this->y, b.y) &&
double_equal(this->z, b.z) &&
double_equal(this->w, b.w); };
bool operator!=(const Tuple &b) const { return !(*this == b); };
Tuple operator+(const Tuple &b) const { return Tuple(this->x + b.x, this->y + b.y,
this->z + b.z, this->w + b.w); };

View File

@@ -43,13 +43,8 @@ double min3(double a, double b, double c)
if (b <= a)
{
if (c < b) return c;
return b;
}
if (c <= a)
{
if (b < c) return b;
}
return c;
return b;
}
double max3(double a, double b, double c)
@@ -62,11 +57,6 @@ double max3(double a, double b, double c)
if (b >= a)
{
if (c > b) return c;
return b;
}
if (c >= a)
{
if (b > c) return b;
}
return c;
return b;
}