# Ratio

> Represents a ratio, used for Aspect Ratio style property.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule
* **Implements:** [IEquatable\<Ratio>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public readonly struct Ratio : IEquatable<Ratio>
```

## Constructors

| Constructor                                                                                  | Description                        |
| -------------------------------------------------------------------------------------------- | ---------------------------------- |
| [Ratio(System.Single)](/engine/6000.7/script-reference/unityengine/uielements/ratio/ctor.md) | Create a ratio from a float value. |

## Properties

| Property                                                                       | Description                                                                  |
| ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- |
| [value](/engine/6000.7/script-reference/unityengine/uielements/ratio/value.md) | The float value of the ratio. Will be float.NaN if the ratio is set to auto. |

## Methods

| Method                                                                           | Description                                                |
| -------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [IsAuto](/engine/6000.7/script-reference/unityengine/uielements/ratio/isauto.md) | Property indicating that no specific ratio should be used. |

## Static Methods

| Method                                                                       | Description                                                                  |
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [Auto](/engine/6000.7/script-reference/unityengine/uielements/ratio/auto.md) | Create a special ratio value that indicate no specific ratio should be used. |
