### 26.13.8 Slope of a line

The slope command finds the slope of a line.

- slope takes one or two arguments: L, a line, a line segment, or two points determining a line.
- slope(L) returns the slope of the line.

#### Examples

slope(line(1,2 i))

or:

slope(segment(1,2 i))

or:

slope(1,2 i)

−2 |  |  |  |  |  |  |  |  |  |

slope(line(x-2 y=3))

1
2

slope(tangent(plotfunc(sin(x)),pi/4))

or:

slope(LineTan(sin(x),pi/4))

√ |
2
2

The slope command has slopeat and slopeatraw versions (see Section 26.13.1).