geom/plane: correct the sense of coefficient `D'
This commit is contained in:
parent
6290f0be93
commit
44d5b655ab
@ -29,7 +29,7 @@ plane<S,T>::plane (point<S,T> base, vector<S,T> normal)
|
|||||||
CHECK (is_normalised (normal));
|
CHECK (is_normalised (normal));
|
||||||
|
|
||||||
std::copy (std::begin (normal), std::end (normal), std::begin (coefficients));
|
std::copy (std::begin (normal), std::end (normal), std::begin (coefficients));
|
||||||
coefficients[S] = dot (base, normal);
|
coefficients[S] = -dot (base, normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ namespace util::geom {
|
|||||||
{
|
{
|
||||||
auto d = dot (
|
auto d = dot (
|
||||||
p.coefficients,
|
p.coefficients,
|
||||||
q.template redim<S+1> (-1)
|
q.template redim<S+1> (1)
|
||||||
);
|
);
|
||||||
|
|
||||||
return d / norm (normal (p));
|
return d / norm (normal (p));
|
||||||
|
Loading…
Reference in New Issue
Block a user