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.Types.Math.Vector2Like <optional>

An optional point-like object in which to store the coordinates of intersection, if needed.

Returns:
Description:

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

Type:
  • boolean
Since: 3.0.0