# MinMaxRect(float, float, float, float)

> Creates a rectangle from min/max coordinate values.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static Rect MinMaxRect(float xmin, float ymin, float xmax, float ymax)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The minimum X coordinate.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The minimum Y coordinate.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The maximum X coordinate.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The maximum Y coordinate.

### Returns

| Type                                                        | Description                                     |
| ----------------------------------------------------------- | ----------------------------------------------- |
| [Rect](/engine/6000.7/script-reference/unityengine/rect.md) | A rectangle matching the specified coordinates. |
