<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/PhysicalMetricsConverter/convert(_:from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI24PhysicalMetricsConverterV7convert_4from14CoreFoundation7CGFloatVAH_So12NSUnitLengthCtF::OverloadGroup"
  },
  "title" : "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.

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

## Return Value

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)