Skip to content

Commit bddb13c

Browse files
committed
Fix some failing documentation
This fixes the first wave of sphinx errors
1 parent 436227b commit bddb13c

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

docs/Geometry.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -491,10 +491,15 @@ Defines an undirected two-dimensional line by an axis, a minimum and a maximum.
491491
Determine if the line contains the specified point, which is assumed
492492
to be defined the same way as min and max.
493493

494+
.. tip::
495+
496+
It is not possible for both returned booleans to be `True`.
497+
498+
494499
Axis-Aligned Line (autogen)
495500
---------------------------
496501

497-
.. autoclass:: pygorithm.geometry.AxisAlignedLine
502+
.. autoclass:: pygorithm.geometry.axisall.AxisAlignedLine
498503
:members:
499504

500505
Concave Polygon
@@ -519,14 +524,14 @@ index to the larger index will walk clockwise around the polygon.
519524
To reduce unnecessary recalculations, Polygons notably do not have
520525
an easily modifiable position. However, where relevant, the class
521526
methods will accept offsets to the polygons.
522-
527+
523528
.. note::
524529

525530
Unfortunately, operations on rotated polygons require recalculating
526531
the polygon based on its rotated points. This should be avoided
527532
unless necessary through the use of Axis-Aligned Bounding Boxes
528533
and similar tools.
529-
534+
530535
.. attribute:: Polygon2.points
531536

532537
The ordered list of `Vector2`s in this polygon.
@@ -543,15 +548,15 @@ index to the larger index will walk clockwise around the polygon.
543548
.. attribute:: Polygon2.center
544549

545550
The `Vector2` center of the polygon. Lazily initialized.
546-
551+
547552
.. attribute:: Polygon2.aabb
548553

549554
The `Rect2` bounding box of this polygon. Lazily initialized.
550-
555+
551556
.. method:: Polygon2(self, points)
552557

553558
- **points** - The ordered list of points in this polygon.
554-
559+
555560
.. staticmethod:: Polygon2.contains_point(polygon, offset, vec)
556561

557562
- **polygon** - polygon to check

pygorithm/geometry/axisall.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(self, axis, point1, point2):
4848
Construct an axis aligned line with the appropriate min and max.
4949
5050
:param axis: axis this line is on
51-
:type axis: :class:`pygorithm.geometry.Vector2`
51+
:type axis: :class:`pygorithm.geometry.vector2.Vector2`
5252
:param point1: one point on this line
5353
:type point1: :class:`numbers.Number`
5454
:param point2: a different point on this line
@@ -74,9 +74,9 @@ def intersects(line1, line2):
7474
the same operations.
7575
7676
:param line1: the first line
77-
:type line1: :class:`pygorithm.geometry.AxisAlignedLine`
77+
:type line1: :class:`pygorithm.geometry.axisall.AxisAlignedLine`
7878
:param line2: the second line
79-
:type line2: :class:`pygorithm.geometry.AxisAlignedLine`
79+
:type line2: :class:`pygorithm.geometry.axisall.AxisAlignedLine`
8080
:returns: touching, overlapping
8181
:rtype: bool, bool
8282
"""
@@ -101,9 +101,9 @@ def find_intersection(line1, line2):
101101
102102
103103
:param line1: the first line
104-
:type line1: :class:`pygorithm.geometry.AxisAlignedLine`
104+
:type line1: :class:`pygorithm.geometry.axisall.AxisAlignedLine`
105105
:param line2: the second line
106-
:type line2: :class:`pygorithm.geometry.AxisAlignedLine`
106+
:type line2: :class:`pygorithm.geometry.axisall.AxisAlignedLine`
107107
:returns: touching, mtv against 1
108108
:rtype: bool, :class:`numbers.Number` or None
109109
"""
@@ -122,7 +122,7 @@ def contains_point(line, point):
122122
It is not possible for both returned booleans to be `True`.
123123
124124
:param line: the line
125-
:type line: :class:`pygorithm.geometry.AxisAlignedLine`
125+
:type line: :class:`pygorithm.geometry.axisall.AxisAlignedLine`
126126
:param point: the point
127127
:type point: :class:`numbers.Number`
128128
:returns: if the point is an edge of the line, if the point is contained by the line

0 commit comments

Comments
 (0)