0.1.0 • Published 12 years ago
is-triangle v0.1.0
is-triangle
Return whether an array of 3 points describe a triangle.
example
var isTriangle = require('is-triangle');
console.log(istriangle([ [ 3, 0 ], [ 4, 1 ], [ 5, 2 ] ])); // false
console.log(istriangle([ [ 3, 0 ], [ 4, -2 ], [ 5, 2 ] ])); // truemethods
var isTriangle = require('is-triangle');isTriangle(pts, opts={})
Return whether the array of pts is a triangle, in any dimension.
pts is an array array coordinates.
Optionally you can control the tolerance for equality comparisons with
opts.tolerance. The default tolerance is 1e-10.
install
With npm do:
npm install is-trianglelicense
MIT

