Skip to content

Commit

Permalink
style(python2): Ensure __division__ is imported at the top of every file
Browse files Browse the repository at this point in the history
... even those where there's no division happening (just in case).
  • Loading branch information
chriswmackey committed Aug 16, 2024
1 parent bae086f commit 5a99778
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions ladybug_geometry/_polyline.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Hidden utility functions used by both Polyline2D and Polyline3D classes."""
from __future__ import division


def _group_vertices(segments, tolerance):
Expand Down
1 change: 1 addition & 0 deletions ladybug_geometry/dictutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Ladybug_geometry library in order to be able to re-serialize almost any
dictionary produced from the library.
"""
from __future__ import division

from ladybug_geometry.geometry2d import Vector2D, Point2D, Ray2D, \
LineSegment2D, Arc2D, Polyline2D, Polygon2D, Mesh2D
Expand Down
2 changes: 1 addition & 1 deletion ladybug_geometry/geometry3d/plane.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def y(self):
@property
def azimuth(self):
"""Get the azimuth of the plane.
This is always between 0, indicating the positive Y-axis, and moving clockwise
up to 2 * Pi, which indicates a return to the positive Y-axis.
Expand Down
2 changes: 1 addition & 1 deletion ladybug_geometry/intersection2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def intersect_line_segment2d(line_a, line_b):
# compute the intersection point
int_pta = Point2D(line_a.p.x + ua * line_a.v.x, line_a.p.y + ua * line_a.v.y)
int_ptb = Point2D(line_b.p.x + ub * line_b.v.x, line_b.p.y + ub * line_b.v.y)

# if the two points are unequal, there's a floating point tolerance issue
if _isclose(int_pta.x, int_ptb.x) and _isclose(int_pta.y, int_ptb.y):
return int_pta
Expand Down

0 comments on commit 5a99778

Please sign in to comment.