position

Calculates a position on the line at a given parameter t. The position is determined by extending or retracting the line along its direction vector by t units from the origin.

Return

The computed position as a Vector2 object.

Parameters

t

The parameter along the line, where 0 represents the origin, positive values extend in the direction of the line, and negative values extend in the opposite direction.