<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ScreenSaver",
  "identifier" : "/documentation/ScreenSaver/SSRandomFloatBetween(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Screen Saver"
    ],
    "preciseIdentifier" : "c:@F@SSRandomFloatBetween"
  },
  "title" : "SSRandomFloatBetween(_:_:)"
}
-->

# SSRandomFloatBetween(_:_:)

Returns a random float value.

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

## Parameters

`a`

The first floating-point value.

`b`

The second floating-point value.

## Return Value

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

## Discussion

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

---

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)