Socket
Book a DemoInstallSign in
Socket

robust-triangle-triangle-2d-intersect

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

robust-triangle-triangle-2d-intersect

Test if two triangles in the plane intersect

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

robust-triangle-triangle-2d-intersect

A slow, but robust predicate to test if two triangles intersect in the plane. This may get improved later on, time permitting.

Example

var tritri = require('robust-triangle-triangle-2d-intersect')

console.log(tritri(
  [ [0, 0],
    [1, 0],
    [0, 1] ],
  [ [0.5, 0.5],
    [1.5, 0.5],
    [0.5, 1.5] ]))

Install

npm i robust-triangle-triangle-2d-intersect

API

require('robust-triangle-triangle-2d-intersect')(a, b)

Test if two plane triangles intersect

  • a,b are triangles

Returns true if a intersects b, false otherwise

License

(c) 2015 Mikola Lysenko. MIT License

Keywords

triangle

FAQs

Package last updated on 21 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts