line.containsPoint(p)
Return true if the point p lies on the line. Return false otherwise.
true
p
false