![]()  | 
The boundary of a triangle splits the plane in two open regions, a bounded one and an unbounded one.
| 
         | |
| 
    introduces a triangle t with vertices p,  q and r.
 
  | |
| 
         | 
         | Test for equality: two triangles are equal, iff there exists a cyclic permutation of the vertices of t2, such that they are equal to the vertices of t. | 
| 
         | 
         | Test for inequality. | 
| 
         | 
         | returns the i'th vertex modulo 3 of t. | 
| 
         | 
         | returns vertex(i). | 
| 
         | 
         | triangle t is degenerate, if the vertices are collinear. | ||
| 
         | 
         | returns the orientation of t. | ||
| 
         | 
         | |||
    returns 
        ON_ORIENTED_BOUNDARY, or
        POSITIVE_SIDE, 
        or the constant
        ON_NEGATIVE_SIDE,
        determined by the position of point p.
        
  | ||||
| 
         | 
         | |||
    returns the constant ON_BOUNDARY,
        ON_BOUNDED_SIDE, or else
        ON_UNBOUNDED_SIDE,
        depending on where point p is.
        
  | ||||
For convenience we provide the following Boolean functions:
| 
         | 
         | |||
| 
         | 
         | |||
| 
         | 
         | |||
| 
         | 
         | |||
| 
         | 
         | |||
    
  | ||||
| 
         | 
         | returns a triangle where the boundary is oriented the other way round (this flips the positive and the negative side, but not the bounded and unbounded side). | 
| 
         | 
         | returns the signed area of t. | 
| 
         | 
         | returns a bounding box containing t. | 
| 
         | 
         | |
| returns the triangle obtained by applying at on the three vertices of t. | ||