Phaser API Documentation

  Version: 
<static> Power(x1, y1, x2, y2, pow)

Description:

Calculate the distance between two sets of coordinates (points) to the power of pow.

Parameters:

name type description
x1 number

The x coordinate of the first point.

y1 number

The y coordinate of the first point.

x2 number

The x coordinate of the second point.

y2 number

The y coordinate of the second point.

pow number

The exponent.

Returns:
Description:

The distance between each point.

Type:
  • number
Since: 3.0.0