## MathUtils.RayIntersect method

Check if ray (origin, dir) intersects with line segment(start, end)

```csharp
public static Vector2? RayIntersect(Vector2 origin, Vector2 dir, Vector2 a, Vector2 b)
```

| Parameter | Type | Description |
| --- | --- | --- |
| origin | Vector2 |  |
| dir | Vector2 |  |
| a | Vector2 |  |
| b | Vector2 |  |

### See Also

* struct [Vector2](../../vector2/)
* class [MathUtils](../)
* namespace [Aspose.ThreeD.Utilities](../../mathutils/)
* assembly [Aspose.3D](../../../)


