Skip to content

Commit

Permalink
Try to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmelnikow committed Jul 3, 2020
1 parent 27d56cd commit 2a7292c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions polliwog/plane/_plane_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit 2a7292c

Please sign in to comment.