Previous Up Next

12.14.10  The length of a vector: abs

The abs command takes as argument either a complex number or a vector defined by two points.

abs returns the absolute value of the complex number or the length of the vector.
Input:

abs(1+i)

or:

abs(point(1+2*i) - point(i))

Output:

sqrt(2)

Previous Up Next