@@ -28,12 +28,12 @@ class Rect2(object):
28
28
many operations incurring expensive recalculations.
29
29
30
30
.. caution::
31
-
32
- Collision detection against a rectangle with cause
31
+
32
+ Collision detection against a polygon with cause
33
33
initialization of the polygon representation of a
34
34
rectangle. This has the noticeable performance
35
35
characteristics that are seen whenever a polygon
36
- is constructed (see :py:class:~`pygorithm.geometry.polygon2 .Polygon2`).
36
+ is constructed (see :py:class:` .Polygon2`).
37
37
This operation recurrs only if width and height
38
38
were modified.
39
39
@@ -45,7 +45,7 @@ def __init__(self, width, height, mincorner = None):
45
45
"""
46
46
Create a new rectangle of width and height.
47
47
48
- If mincorner is None, the origin is assumed.
48
+ If `` mincorner is None`` , the origin is assumed.
49
49
50
50
:param width: width of this rect
51
51
:type width: :class:`numbers.Number`
@@ -69,8 +69,8 @@ def polygon(self):
69
69
70
70
.. caution::
71
71
72
- This does not include the mincorner (which should be passed as
73
- offset)
72
+ This does not include the :py:attr:~`pygorithm.geometry.rect2.Rect2. mincorner`
73
+ (which should be passed as offset for polygon operations )
74
74
75
75
:returns: polygon representation of this rectangle
76
76
:rtype: :class:`pygorithm.geometry.polygon2.Polygon2`
@@ -96,7 +96,7 @@ def width(self):
96
96
:returns: width of this rect
97
97
:rtype: :class:`numbers.Number`
98
98
99
- :raises ValueError: if trying to set width <= 1e-07
99
+ :raises ValueError: if trying to set `` width <= 1e-07``
100
100
"""
101
101
return self ._width
102
102
@@ -121,7 +121,7 @@ def height(self):
121
121
:returns: height of this rect
122
122
:rtype: :class:`numbers.Number`
123
123
124
- :raises ValueError: if trying to set height <= 1e-07
124
+ :raises ValueError: if trying to set `` height <= 1e-07``
125
125
"""
126
126
return self ._height
127
127
@@ -185,7 +185,7 @@ def contains_point(rect, point):
185
185
186
186
.. tip::
187
187
188
- This will never return True, True
188
+ This will never return `` True, True``
189
189
190
190
:param rect: the rect
191
191
:type rect: :class:`pygorithm.geometry.rect2.Rect2`
@@ -359,9 +359,9 @@ def find_intersection(cls, *args, **kwargs):
359
359
360
360
For Rect-Polygon intersection:
361
361
362
- Must be passed in 3 arguments - a :py:class:~`pygorithm.geometry.rect2 .Rect2`,
363
- a :py:class:~`pygorithm.geometry.polygon2 .Polygon2`, and a
364
- :py:class:~`pygorithm.geometry.vector2 .Vector2`. The vector must come immediately
362
+ Must be passed in 3 arguments - a :py:class:` .Rect2`,
363
+ a :py:class:` .Polygon2`, and a
364
+ :py:class:` .Vector2`. The vector must come immediately
365
365
after the polygon, but the rect can be either the first or last unnamed argument.
366
366
If it is the first argument, the mtv is against the rectangle. If it is the last
367
367
argument, the mtv is against the polygon.
0 commit comments