---
title: aspectRatio
framework: MetalFX
role: symbol
role_heading: Instance Property
platforms: [iOS 26.0+, iPadOS 26.0+, Mac Catalyst 26.0+, macOS 26.0+, tvOS 27.1+]
path: metalfx/mtlfxframeinterpolatorbase/aspectratio
---

# aspectRatio

The ratio between width and height of the screen.

## Declaration

```swift
var aspectRatio: Float { get set }
```

## Discussion

Discussion In a 3D game, you set this value to the same aspect ratio you use to create your perspective matrix, which is typically width/height.
