Skip to content

Commit 17bf04f

Browse files
Further clarify the two line intersection methods
1 parent 8ebf8ae commit 17bf04f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/classes/Geometry2D.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
<param index="3" name="dir_b" type="Vector2" />
142142
<description>
143143
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.
144-
[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.
144+
[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].
145145
[codeblocks]
146146
[gdscript]
147147
var from_a = Vector2.ZERO
@@ -252,7 +252,7 @@
252252
<param index="2" name="from_b" type="Vector2" />
253253
<param index="3" name="to_b" type="Vector2" />
254254
<description>
255-
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].
255+
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.
256256
</description>
257257
</method>
258258
<method name="triangulate_delaunay">

0 commit comments

Comments
 (0)