-
-
Notifications
You must be signed in to change notification settings - Fork 18
point_in_line
Vašek edited this page Feb 10, 2019
·
6 revisions
Check if a given point is on a given line
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
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
.
point_in_line(new Vector2(0, 0), new Vector2(20, 20), 10, 10);
This function returns true.
Back to Raycasting