Function reference · Linear algebra

line

Returns the line through two points, as an expression in x.

Pass the points as two-element vectors. A third argument names the variable instead of x.

Notation

line(arg1, arg2, [arg3])

Write it in an expression: nerdamer('line([0,0],[1,1])'), or in the Playground.

nerdamer.line

nerdamer.line(...args: [p1, p2, dimension]): Expression

A method on the default import. Arguments can be strings, as in Notation.

Examples

Through the origin and (1,1).

line([0,0],[1,1])
// → x
Open in Playground

Through (1,2) and (3,8).

line([1,2],[3,8])
// → -1+3*x
Open in Playground

In t instead of x.

line([1,2],[3,8],t)
// → -1+3*t
Open in Playground

← Back to Function reference