Skip to main content

utils.beamIntersectsLine()

The utils.beamIntersectsLine() function finds the intersection between an endless line (beam) and a (limited) line segment. Returns a Point object for the intersection, or false if the beam doesn't intersect the line.

The first two points in the parameter list form the beam, the last two points form the line.

Signature

Point | false utils.beamIntersectsLine(
Point beamA,
Point beamB,
Point lineA,
Point lineB
)

Example

A Utils.beamIntersectsLine() example