From 17bf04fd2bc1e60f7f0472dbccaae39e6a533ceb Mon Sep 17 00:00:00 2001 From: Adriaan de Jongh <5611323+AdriaandeJongh@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:07:45 +0200 Subject: [PATCH] Further clarify the two line intersection methods --- doc/classes/Geometry2D.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml index 774bff6113..b8461a7854 100644 --- a/doc/classes/Geometry2D.xml +++ b/doc/classes/Geometry2D.xml @@ -141,7 +141,7 @@ Returns the point of intersection between the two lines ([param from_a], [param dir_a]) and ([param from_b], [param dir_b]). Returns a [Vector2], or [code]null[/code] if the lines are parallel. - [code]from[/code] and [code]dir[/code] are [i]not[/i] endpoints of a line segment or ray but the slope ([code]dir[/code]) and a known point ([code]from[/code]) on that line. + [code]from[/code] and [code]dir[/code] are [i]not[/i] endpoints of a line segment or ray but the slope ([code]dir[/code]) and a known point ([code]from[/code]) on that line. To get the intersection between two line segments, use [method segment_intersects_segment]. [codeblocks] [gdscript] var from_a = Vector2.ZERO @@ -252,7 +252,7 @@ - Checks if the two segments ([param from_a], [param to_a]) and ([param from_b], [param to_b]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns [code]null[/code]. + Checks if two line segments intersect, with line [code]a[/code] between [param from_a] and [param to_a] and line [code]b[/code] between [param from_b] and [param to_b]. If the line segments intersect, the point of intersection is returned as a [Vector2]. If no intersection takes place, [code]null[/code] is returned.