diff --git a/polliwog/plane/_plane_object.py b/polliwog/plane/_plane_object.py index 78f07a4..2b5c534 100644 --- a/polliwog/plane/_plane_object.py +++ b/polliwog/plane/_plane_object.py @@ -138,14 +138,14 @@ def flipped(self): """ return Plane(point_on_plane=self._r0, unit_normal=-self._n) - def sign(self, points): + def sign(self, points, decimal=12): """ Given an array of points, return an array with +1 for points in front of the plane (in the direction of the normal), -1 for points behind the plane (away from the normal), and 0 for points on the plane. """ - return np.sign(self.signed_distance(points)) + return np.sign(self.signed_distance(points).round(decimal)) def points_in_front(self, points, inverted=False, ret_indices=False): """