Skip to content

Commit 5812f94

Browse files
committed
Minor documentation tweaks
Attempt fix failing references and try a different method of inline code highlighting in hopes it doesn't just use red text.
1 parent c2b1c39 commit 5812f94

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pygorithm/geometry/line2.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Line2(object):
4141

4242
def __init__(self, start, end):
4343
"""
44-
Create a new line 2 from start to end.
44+
Create a new line from start to end.
4545
4646
:param start: the start point
4747
:type start: :class:`pygorithm.geometry.vector2.Vector2`
@@ -151,7 +151,8 @@ def slope(self):
151151
The slope may be 0 (horizontal line) or positive or negative
152152
infinity (vertical lines). It may be necessary to handle
153153
these lines seperately, typically through checking the
154-
:py:attr:`~horizontal` and :py:attr:`~vertical` properties.
154+
:py:attr:`~pygorithm.geometry.line2.Line2.horizontal` and
155+
:py:attr:`~pygorithm.geometry.line2.Line2.vertical` properties.
155156
156157
157158
:returns: the slope of this line (rise over run).
@@ -170,13 +171,14 @@ def y_intercept(self):
170171
.. caution::
171172
172173
This function will return a y-intercept for non-vertical
173-
line segments that do not reach x=0.
174+
line segments that do not reach :code:`x=0`.
174175
175176
.. caution::
176177
177178
The y-intercept will change based on the offset in a somewhat
178-
complex manner. :py:meth:`~calculate_y_intercept` accepts an
179-
offset parameter.
179+
complex manner.
180+
:py:meth:`~pygorithm.geometry.line2.Line2.calculate_y_intercept`
181+
accepts an offset parameter.
180182
181183
:returns: the y-intercept of this line when unshifted
182184
:rtype: :class:`numbers.Number` or None
@@ -202,7 +204,7 @@ def vertical(self):
202204
Get if this line is vertical, lazily initialized.
203205
204206
A line is vertical if it has a slope of +inf or -inf. This
205-
also means that :code:`start.x == end.x`.
207+
also means that ``start.x == end.x``.
206208
207209
:returns: if this line is vertical
208210
:rtype: bool

0 commit comments

Comments
 (0)