JSPM

is-triangle

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q27599F
  • License MIT

return whether an array of points (in any dimension) describe a triangle

Package Exports

  • is-triangle

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-triangle) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-triangle

Return whether an array of 3 points describe a triangle.

testling badge

build status

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 ] ])); // true

methods

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-triangle

license

MIT