<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vDSP/reverse(_:)-38ptd",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate4vDSPO7reverseyyxzAA0A13MutableBufferRzSf7ElementRtzlFZ"
  },
  "title" : "reverse(_:)"
}
-->

# reverse(_:)

Reverses a vector of single-precision values in-place.

```
static func reverse<V>(_ vector: inout V) where V : AccelerateMutableBuffer, V.Element == Float
```

## Parameters

`vector`

The vector that the function reverses.

## Discussion

The single- and double-precision [`reverse(_:)`](/documentation/Accelerate/vDSP/reverse(_:)-3aq38) functions reverse the elements of an array.

The following code reverses the elements in the array `values`:

```swift
var values: [Float] = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]

vDSP.reverse(&values)

// Prints "[0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]".
print(values)
```

---

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)