Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

AltStyle によって変換されたページ (->オリジナル) /