diff --git a/main/Scene.cc b/main/Scene.cc index 417cb10..330daca 100644 --- a/main/Scene.cc +++ b/main/Scene.cc @@ -151,8 +151,6 @@ void Scene::renderPixel(int x, int y, unsigned char * pixel) } /* take the average of all the samples as the final pixel value */ - if (finalColor.r > 1.0 || finalColor.g > 1.0 || finalColor.b > 1.0) - cerr << "Error: " << finalColor << endl; pixel[BMP_RED] = (unsigned char) (0xFF * finalColor.r / m_multisample_level_squared); pixel[BMP_GREEN] = (unsigned char) diff --git a/util/Vector.cc b/util/Vector.cc index bbdde16..d970dc0 100644 --- a/util/Vector.cc +++ b/util/Vector.cc @@ -60,7 +60,7 @@ Vector Vector::reflect(const Vector & target) const { Vector projected = proj(target); Vector me_to_proj = projected - (*this); - return projected + me_to_proj * 2.0; + return (*this) + me_to_proj * 2.0; } std::ostream & operator<<(std::ostream & out, const Vector & v)