Line#intersects()

intersects(line, asSegment, result) → {Phaser.Point}

Checks for intersection between this line and another Line.
If asSegment is true it will check for segment intersection. If asSegment is false it will check for line intersection.
Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.

Parameters
Name Type Argument Default Description
line Phaser.Line

The line to check against this one.

asSegment boolean <optional>
true

If true it will check for segment intersection, otherwise full line intersection.

result Phaser.Point <optional>

A Point object to store the result in, if not given a new one will be created.

Returns

The intersection segment of the two lines as a Point, or null if there is no intersection.

Source code: geom/Line.js (Line 151)
doc_phaser
2017-02-14 10:53:59
Comments
Leave a Comment

Please login to continue.