diff --git a/geom/plane.cpp b/geom/plane.cpp index d4bea1c2..87d2aa97 100644 --- a/geom/plane.cpp +++ b/geom/plane.cpp @@ -29,7 +29,7 @@ plane::plane (point base, vector normal) CHECK (is_normalised (normal)); std::copy (std::begin (normal), std::end (normal), std::begin (coefficients)); - coefficients[S] = dot (base, normal); + coefficients[S] = -dot (base, normal); } diff --git a/geom/plane.hpp b/geom/plane.hpp index f20a1ee6..b87d99b6 100644 --- a/geom/plane.hpp +++ b/geom/plane.hpp @@ -81,7 +81,7 @@ namespace util::geom { { auto d = dot ( p.coefficients, - q.template redim (-1) + q.template redim (1) ); return d / norm (normal (p));