geometry
ArePerpendicular
test if two lines are perpendicular to each other
Calling Sequence
Parameters
Description
Examples
ArePerpendicular(l1, l2, cond)
l1, l2
-
two lines
cond
(optional) name
The routine returns true if l1 and l2 are perpendicular to each other; false if they are not; and FAIL if it is unable to determine if l1 and l2 are perpendicular to each other.
In case of FAIL, if the third optional argument is given, the condition that makes l1 and l2 perpendicular to each other is assigned to this argument.
The command with(geometry,ArePerpendicular) allows the use of the abbreviated form of this command.
with⁡geometry:
line⁡l1,y=x,x,y:
line⁡l2,y=−x,x,y:
ArePerpendicular⁡l1,l2
true
line⁡l3,x=2,x,y:
ArePerpendicular⁡l1,l3
false
b≔3:
line⁡l4,b⁢y+a⁢x=0,x,y:
ArePerpendicular⁡l1,l4,cond
ArePerpendicular: "hint: cannot determine if -a+3 is zero"
FAIL
−a+3=0
assume⁡cond
See Also
geometry[AreParallel]
Download Help Document