Phaser API Documentation

  Version: 
<static> ContainsPoint(triangle, point)

Description:

Tests if a triangle contains a point.

Parameters:

name type description
triangle Phaser.Geom.Triangle

The triangle.

point any | Phaser.Geom.Point | Phaser.Math.Vector2

The point to test, or any point-like object with public x and y properties.

Returns:
Description:

true if the point is within the triangle, otherwise false.

Type:
  • boolean
Since: 3.0.0