# IntersectLines(Vector2, Vector2, Vector2, Vector2)

> Finds the intersection between two infinite lines

## Definition

* **Type:** Method
* **Namespace:** [Unity.VectorGraphics](/engine/6000.6/script-reference/unity/vectorgraphics.md)
* **Assembly:** UnityEngine.VectorGraphicsModule

```csharp
public static Vector2 IntersectLines(Vector2 line1Pt1, Vector2 line1Pt2, Vector2 line2Pt1, Vector2 line2Pt2)
```

### Parameters

**** (\[Vector2]\(/engine/6000.6/script-reference/unityengine/vector2)): The first point of the first line**** (\[Vector2]\(/engine/6000.6/script-reference/unityengine/vector2)): The second point of the first line**** (\[Vector2]\(/engine/6000.6/script-reference/unityengine/vector2)): The first point of the second line**** (\[Vector2]\(/engine/6000.6/script-reference/unityengine/vector2)): The second point of the second line

### Returns

| Type                                                              | Description                                                                                           |
| ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [Vector2](/engine/6000.6/script-reference/unityengine/vector2.md) | The intersection point, or (float.PositiveInfinity, float.PositiveInfinity) if the lines are parallel |
