---
title: "convert(_:from:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/physicalmetricsconverter/convert(_:from:)"
---

# convert(_:from:)

Converts a length in the specified unit to a length in points suitable for use in the environment this converter is associated with.

## Declaration

```swift
@MainActor @preconcurrency func convert(_ lengthValue: CGFloat, from unit: UnitLength) -> CGFloat
```

## Return Value

Return Value A value in points. Use this value only in the scene this converter was associated with.

## See Also

### Converting a unit length

- [convert(_:to:)](swiftui/physicalmetricsconverter/convert(_:to:).md)
