geom/ray: correct the sense of ray/plane distance

This commit is contained in:
Danny Robson 2018-05-03 16:39:57 +10:00
parent a1aa0c6949
commit cfefca7767

View File

@ -72,8 +72,8 @@ namespace util::geom {
{
CHECK_SANITY (r);
return dot (p.coefficients, r.origin. template redim<S+1> (1)) /
dot (p.coefficients, r.direction.template redim<S+1> (0));
return -dot (p.coefficients, r.origin. template redim<S+1> (1)) /
dot (p.coefficients, r.direction.template redim<S+1> (0));
}