MapWinGeoProc:Utils IsLeft

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy

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

Retrieved from "http://mapwindow.org/wiki/index.php/MapWinGeoProc:Utils_IsLeft"

This page has been accessed 926 times. This page was last modified on 26 June 2006, at 03:20.