point-in-triangle

WebJar for point-in-triangle

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

point-in-triangle
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

point-in-triangle
WebJar for point-in-triangle
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mattdesl/point-in-triangle

Download point-in-triangle

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/point-in-triangle/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>point-in-triangle</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/point-in-triangle/
implementation 'org.webjars.npm:point-in-triangle:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/point-in-triangle/
implementation ("org.webjars.npm:point-in-triangle:1.0.1")
'org.webjars.npm:point-in-triangle:jar:1.0.1'
<dependency org="org.webjars.npm" name="point-in-triangle" rev="1.0.1">
  <artifact name="point-in-triangle" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='point-in-triangle', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "point-in-triangle" % "1.0.1"
[org.webjars.npm/point-in-triangle "1.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

point-in-triangle

stable

Test whether a point is inside a triangle, using barycentric coordinates and this algorithm from BlackPawn.

var inside = require('point-in-triangle')

var triangle = [ [25, 10], [100, 250], [40, 40] ]
console.log(inside([25, 25], triangle))

You may also be interested in:

Usage

NPM

inside(point, triangle)

Returns true if the point [x, y] is inside the triangle [ [x1,y1], [x2,y2], [x3,y3] ], false otherwise.

License

MIT, see LICENSE.md for details.

Versions

Version
1.0.1