## IsLeft

**Syntax**

double IsLeft(System.Double x0, System.Double y0, System.Double x1, System.Double y1, System.Double x2, System.Double y2)

**Summary**

Tests if a point is left|on|right of an infinite line.

See: the January 2001 Algorithm "Area of 2D and 3D Triangles and
Polygons"

at http://softsurfer.com/Archive/algorithm_0101/algorithm_0101.htm

**Parameters**

x0 |
X value for point 0 of the line. |

y0 |
Y value for point 0 of the line. |

x1 |
X value for point 1 of the line. |

y1 |
Y value for point 1 of the line. |

x2 |
X value of the point being tested. |

y2 |
Y value of the point being tested. |

**Returns**

A value > 0 if the point is left of the line.

A value = 0 if the point is on the line.

A value less than 0 if the point right of the line.

Visual Basic Net 2005 Example
Implementation Code

Visual C# 2005 Example Implementation
Code

Back to
Utils