Phaser API Documentation

  Version: 

Member of: Phaser.Curves.Line

getTFromDistance(distance, [divisions])

Description:

Given a distance in pixels, get a t to find p.

Parameters:

name type arguments description
distance number

The distance, in pixels.

divisions number <optional>

Optional amount of divisions.

Returns:
Description:

The distance.

Type:
  • number
Examples:
Since: 3.0.0
Source: src/curves/Curve.js (Line 492)