---
title: "length(_:)"
framework: simd
role: symbol
role_heading: Function
path: "simd/length(_:)-6g7q5"
---

# length(_:)

Returns the length of a vector.

## Declaration

```swift
func length(_ x: SIMD2<Float>) -> Float
```

## See Also

### Length and Distance Functions

- [length_squared(_:)](simd/length_squared(_:)-6tcxv.md)
- [distance(_:_:)](simd/distance(_:_:)-1p8ae.md)
- [distance_squared(_:_:)](simd/distance_squared(_:_:)-9nmpe.md)
