---
title: "SSRandomFloatBetween(_:_:)"
framework: Screen Saver
role: symbol
role_heading: Function
platforms: [macOS 10.0+]
path: "screensaver/ssrandomfloatbetween(_:_:)"
---

# SSRandomFloatBetween(_:_:)

Returns a random float value.

## Declaration

```swift
func SSRandomFloatBetween(_ a: CGFloat, _ b: CGFloat) -> CGFloat
```

## Parameters

- `a`: The first floating-point value.
- `b`: The second floating-point value.

## Return Value

Return Value A random floating-point value between the values a and b, inclusive.

## Discussion

Discussion The Screen Saver framework automatically seeds the random() C function to generate the number.

## See Also

### Utilities

- [SSRandomIntBetween(_:_:)](screensaver/ssrandomintbetween(_:_:).md)
- [SSRandomPointForSizeWithinRect(_:_:)](screensaver/ssrandompointforsizewithinrect(_:_:).md)
- [SSCenteredRectInRect(_:_:)](screensaver/sscenteredrectinrect(_:_:).md)
