# VerticalToHorizontalFieldOfView(float, float)

> Converts the vertical field of view (FOV) to the horizontal FOV, based on the value of the aspect ratio parameter.

## Definition

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

```csharp
public static float VerticalToHorizontalFieldOfView(float verticalFieldOfView, float aspectRatio)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The vertical field of view value in degrees.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The aspect ratio value used for the conversion.

### Returns

| Type                                                          | Description                              |
| ------------------------------------------------------------- | ---------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The horizontal field of view in degrees. |

### Remarks

Additional Resources: [Camera.fieldOfView](/engine/6000.3/script-reference/unityengine/camera/fieldofview.md), [Camera.aspect](/engine/6000.3/script-reference/unityengine/camera/aspect.md), [Camera.HorizontalToVerticalFieldOfView](/engine/6000.3/script-reference/unityengine/camera/horizontaltoverticalfieldofview.md), [Camera.FieldOfViewToFocalLength](/engine/6000.3/script-reference/unityengine/camera/fieldofviewtofocallength.md), [Camera.FocalLengthToFieldOfView](/engine/6000.3/script-reference/unityengine/camera/focallengthtofieldofview.md).

### Examples

```csharp
using UnityEngine;

public class DisplayFov : MonoBehaviour
{
    public Camera target;

    void OnGUI()
    {
        float verticalFOV = target.fieldOfView;
        float horizontalFOV = Camera.VerticalToHorizontalFieldOfView(verticalFOV, target.aspect);

        GUILayout.Label($"Vertical FOV : {verticalFOV} degrees");
        GUILayout.Label($"Horizontal FOV : {horizontalFOV} degrees");
    }
}
```
