Phaser API Documentation

  Version: 
<static> LineToLine(line1, line2, [out])

Description:

Checks if two Lines intersect. If the Lines are identical, they will be treated as parallel and thus non-intersecting.

Parameters:

name type arguments description
line1 Phaser.Geom.Line

The first Line to check.

line2 Phaser.Geom.Line

The second Line to check.

out Phaser.Geom.Point <optional>

A Point in which to optionally store the point of intersection.

Returns:
Description:

true if the two Lines intersect, and the out object will be populated, if given. Otherwise, false.

Type:
  • boolean
Examples:
Since: 3.0.0