Phaser API Documentation

  Version: 
getTangent(t, [out])

Description:

Get a unit vector tangent at a relative position on the curve. In case any sub curve does not implement its tangent derivation, 2 points a small delta apart will be used to find its gradient which seems to give a reasonable approximation

Parameters:

name type arguments description
t number

The relative position on the curve, [0..1].

out Phaser.Math.Vector2 <optional>

A vector to store the result in.

Returns:
Description:

Vector approximating the tangent line at the point t (delta +/- 0.0001)

Since: 3.0.0
Source: src/curves/Curve.js (Line 430)