1.0.0 • Published 12 years ago
left-right v1.0.0
left-right
Tests if 3 points are oriented clockwise, counter-clockwise or colinear.
WARNING This module is deprecated. You should use robust-orientation instead.
Example
var lr = require("left-right")
console.log(lr([1, 0], [0, 0], [0, 1]))
//Prints out: -1Install
npm install left-rightAPI
require("left-right")(a, b, c)
Computes the orientation of a, b, c
a,b,care 3 2d points, encoded as arrays
Returns One of the following values:
- 1 if
a,b,care counter clockwise oriented - -1 if
a,b,care clockwise - 0 if they are colinear
Credits
(c) 2013 Mikola Lysenko. MIT License