Point.shiftTowards()

The Point.shiftTowards() method returns a new Point that is shifted distance (mm) in the direction of the target.

Signature

Javascript
Point point.shiftTowards(Point target, float distance)

Example

Point A Point B Point C is point A shifted 3.5 cmin the direction of point B

Notes

If you need to move a point a percentage instead of a specific distance, use Point.shiftFractionTowards() instead.