utils.pointOnLine()

The utils.pointOnLine() function returns true if the point check lies on a line segment from point from to point to.

Signature

Javascript
bool utils.pointOnLine(
  Point from, 
  Point to, 
  Point check, 
  float precision = 1e6
)

The fourth parameter controls the precision. See pointOnBeam.

Example