<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/random/float2_01",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Compute Graph"
    ],
    "preciseIdentifier" : "random::float2_01"
  },
  "title" : "random::float2_01"
}
-->

# random::float2_01

Generates a pseudo-random 2D vector with single-precision components between 0 and 1.

```
float2 random::float2_01()
```

## Return Value

A pseudo-random 2D single-precision vector with components in the range [0.0, 1.0].

## Discussion

This function generates a random 2D vector where each component is independently
generated in the range [0.0, 1.0] using single-precision floating-point format.
The internal random seed is incremented for subsequent calls.

> Visual: ![Graph](random__float2_01)

---

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)