Checking if two lines in the plane are perpendicular: is_perpendicular

### 13.16.12 Checking if two lines in the plane are perpendicular: is_perpendicular

See Section 14.13.4 for checking for perpendicularity in three-dimensional geometry.

The is_perpendicular command determines whether or not two lines are perpendicular.

- is_perpendicular takes two arguments:
  L1,L2, two lines.
- is_perpendicular(L1,L2) returns 1 if L1 and L2 are perpendicular and otherwise returns 0.

#### Examples

- Input:
  is_perpendicular(line(0,1+i),line(i,1))
  Output:

  1

- Input:
  is_parallel(line(0,1+i),line(1+i,1))
  Output:

  0