8000 Note the low precendence of operators for lines · StephLin/spatialmath-python@daf9ae7 · GitHub
[go: up one dir, main page]

Skip to content

Commit daf9ae7

Browse files
committed
Note the low precendence of operators for lines
1 parent 6135229 commit daf9ae7

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

spatialmath/geom3d.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ def isparallel(self, l2, tol=10*_eps): # pylint: disable=no-self-argument
577577

578578
def __or__(self, l2): # pylint: disable=no-self-argument
579579
"""
580-
Test if lines are parallel as a binary operator
580+
Overloaded ``|`` operator tests for parallelism
581581
582582
:param l1: First line
583583
:type l1: Plucker
@@ -588,6 +588,9 @@ def __or__(self, l2): # pylint: disable=no-self-argument
588588
589589
``l1 | l2`` is an operator which is true if the two lines are parallel.
590590
591+
592+
.. note:: The ``|`` operator has low precendence.
593+
591594
:seealso: Plucker.isparallel, Plucker.__xor__
592595
"""
593596
l1 = self
@@ -597,7 +600,7 @@ def __or__(self, l2): # pylint: disable=no-self-argument
597600
def __xor__(self, l2): # pylint: disable=no-self-argument
598601

599602
"""
600-
Test if lines intersect as a binary operator
603+
Overloaded ``^`` operator tests for intersection
601604
602605
:param l1: First line
603606
:type l1: Plucker
@@ -608,10 +611,11 @@ def __xor__(self, l2): # pylint: disable=no-self-argument
608611
609612
``l1 ^ l2`` is an operator which is true if the two lines intersect at a point.
610613
611-
Notes:
612-
613-
- Is false if the lines are equivalent since they would intersect at
614-
an infinite number of points.
614+
.. note::
615+
616+
- The ``^`` operator has low precendence.
617+
- Is ``False`` if the lines are equivalent since they would intersect at
618+
an infinite number of points.
615619
616620
:seealso: Plucker.intersects, Plucker.parallel
617621
"""

0 commit comments

Comments
 (0)
0