Fix surface coincidence check in CSGCell::distance

This commit is contained in:
Paul Romano 2019-02-22 11:15:43 -06:00
parent ef2767a127
commit 50fb611272

View file

@ -424,7 +424,7 @@ CSGCell::distance(Position r, Direction u, int32_t on_surface) const
// Calculate the distance to this surface.
// Note the off-by-one indexing
bool coincident {token == on_surface};
bool coincident {std::abs(token) == std::abs(on_surface)};
double d {model::surfaces[abs(token)-1]->distance(r, u, coincident)};
// Check if this distance is the new minimum.