--- a/src/geometry.cpp Thu Feb 27 11:56:41 2020 +0200 +++ b/src/geometry.cpp Thu Feb 27 12:23:42 2020 +0200 @@ -17,10 +17,10 @@ * @param plane * @return point of intersection. Does not return a value if the line is in parallel to the plane. */ -std::optional<glm::vec3> geom::linePlaneIntersection(const geom::Line& line, const geom::Plane& plane) +std::optional<glm::vec3> geom::linePlaneIntersection(const geom::Line& line, const geom::Plane& plane, const float epsilon) { const float denominator = glm::dot(line.direction, plane.normal); - if (std::abs(denominator) < 1e-8f) + if (std::abs(denominator) < epsilon) { return {}; }