# Checking if an object is an equilateral triangle in the plane: is_equilateral

### 13.16.5 Checking if an object is an equilateral triangle in the plane: is_equilateral

See Section 14.13.9 for checking for equilateral triangles in three-dimensional geometry.

The is_equilateral command determines whether or not a geometric object is an equilateral triangle.

- is_equilateral takes one argument:
  G, a geometric object or a sequence of three points assumed to be the vertices of a triangle.
- is_equilateral(G) returns 1 if the object is an equilateral triangle and returns 0 otherwise.

#### Examples.

- Input:
  is_equilateral(0,2,1+i*sqrt(3))
  Output:

  1

- Input:

  T:= equilateral_triangle(0,2,C)
  is_equilateral(T[0])

  Output:

  1

  Note that T[0] is a triangle since T is a list made of a triangle and the vertex C.
  Input:
  affix(C)
  Output:

  √

  3

  i+1

- Input:
  is_equilateral(1+i, -1+i, -1-i)
  Output:

  0