From 2a7292c2fd85cf4e73a50049c6750107909cec50 Mon Sep 17 00:00:00 2001 From: Paul Melnikow Date: Fri, 3 Jul 2020 16:26:14 -0400 Subject: [PATCH] Try to fix --- polliwog/plane/_plane_object.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polliwog/plane/_plane_object.py b/polliwog/plane/_plane_object.py index 78f07a47..2b5c534d 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): """