Skip to content

point_in_line

Vašek edited this page Feb 10, 2019 · 6 revisions

point_in_line

Check if a given point is on a given line

Syntax:

point_in_line(p1, p2, x, y)
Argument Description
Vector2 p1 The first point of the line
Vector2 p2 The other point of the line
double x The x coordinate of the point
double y The y coordinate of the point

Returns: bool

Description:

This function checks if the point with coordinates x, y is on the given line. The line is determined by two different points - p1 and p2.

Example:

point_in_line(new Vector2(0, 0), new Vector2(20, 20), 10, 10);

This function returns true.

Back to Raycasting

Clone this wiki locally