---
title: "abs(_:)"
framework: simd
role: symbol
role_heading: Function
path: "simd/abs(_:)-5f1om"
---

# abs(_:)

Elementwise absolute value of a vector.  The result is a vector of the same length with all elements positive.

## Declaration

```swift
func abs(_ x: simd_half2) -> simd_half2
```
