Phaser API Documentation

  Version: 
<static> TriangleToLine(triangle, line)

Description:

Checks if a Triangle and a Line intersect.

The Line intersects the Triangle if it starts inside of it, ends inside of it, or crosses any of the Triangle's sides. Thus, the Triangle is considered "solid".

Parameters:

name type description
triangle Phaser.Geom.Triangle

The Triangle to check with.

line Phaser.Geom.Line

The Line to check with.

Returns:
Description:

true if the Triangle and the Line intersect, otherwise false.

Type:
  • boolean
Examples:
Since: 3.0.0