---
title: "random(in:)"
framework: swift
role: symbol
role_heading: Type Method
path: "swift/simd3/random(in:)-3wbg2"
---

# random(in:)

Returns a vector with random values from within the specified range in all lanes.

## Declaration

```swift
static func random(in range: ClosedRange<Self.Scalar>) -> Self
```
