70002420 How can I check if the passed point is on a line

Article 70002420
Type Wish
Product WebJS
Version 1004
Date Added 10/16/2023 12:00:00 AM
Fixed 10.1005.0.2 (10/16/2023 12:00:00 AM)
Submitted by Ferhat Altun

Summary

How can I check if the passed point is on a line

Solution

In version 1005.0.2 new methods pointonline and distPointFromLine of vdcanvas.vdgeo was added
pointonline(object pt, object p1, object p2) return true if the pointpt is on the line between p1,p2
distPointFromLine(object P, object P0, object P1) returns the perpendicular distance between the given point (P) and the line (P0 -P1).

Send comments on this topic.