robust-segment-intersect

WebJar for robust-segment-intersect

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

robust-segment-intersect
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

robust-segment-intersect
WebJar for robust-segment-intersect
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mikolalysenko/robust-segment-intersect

Download robust-segment-intersect

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : robust-orientation jar [1.1.3,2)

Project Modules

There are no modules declared in this project.

robust-segment-intersect

Exact arithmetic predicate to determine if two closed linesegments intersect.

testling badge

build status

Example

var crosses = require("robust-segment-intersect")

var a0 = [-1, 0]
var a1 = [ 1, 0]
var b0 = [ 0,-1]
var b1 = [ 0, 1]

//Check if line segment a0, a1  crosses segment b0, b1
console.log(crosses(a0, a1, b0, b1))

Install

npm install robust-segment-intersect

API

require("robust-segment-intersect")(a0, a1, b0, b1)

Tests if the closed line segment [a0,a1] intersects the closed line segment [b0,b1].

  • a0, a1 are the end points of the first line segment encoded as length 2 arrays
  • b0, b1 are the end points of the second line segment encoded again as length 2 arrays

Returns true if the linesegments intersect, false otherwise

Credits

(c) 2014 Mikola Lysenko. MIT License

Versions

Version
1.0.1