geom/plane: correct the sense of coefficient `D'

This commit is contained in:
Danny Robson 2018-04-23 22:14:05 +10:00
parent 6290f0be93
commit 44d5b655ab
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ plane<S,T>::plane (point<S,T> base, vector<S,T> 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);
}

View File

@ -81,7 +81,7 @@ namespace util::geom {
{
auto d = dot (
p.coefficients,
q.template redim<S+1> (-1)
q.template redim<S+1> (1)
);
return d / norm (normal (p));