Skip to content

Commit

Permalink
o Fix spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeeja committed Jan 9, 2025
1 parent 9f2a507 commit 3928a5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions uxarray/grid/area.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ def edge_passes_through_pole(node1, node2):
# Check for numerical stability issues with the normal vector
if np.allclose(n, 0):
# Handle cases where the cross product is near zero, such as when nodes are nearly identical or opposite
return False
return False

# Normalize the normal vector
n = n / np.linalg.norm(n)

# North and South Pole vectors
p_north = np.array([0.0, 0.0, 1.0])
p_south = np.array([0.0, 0.0, -1.0])
p_north = np.array([0.0, 0.0, 1.0])
p_south = np.array([0.0, 0.0, -1.0])

# Check if the normal vector is orthogonal to either pole
return np.isclose(np.dot(n, p_north), 0) or np.isclose(np.dot(n, p_south), 0)
Expand Down

0 comments on commit 3928a5e

Please sign in to comment.