# RandomModule

The `RandomModule` class enables random number generation.

## Example

```
//==============================================================================
// The following example demonstrates how to generate a random number and use it
// to change the scale of an object.
//
// Project setup:
// - Insert a plane
//==============================================================================

// Load in the required modules
const Random = require('Random');
const Scene = require('Scene');

// Locate the plane in the Scene
const plane = Scene.root.find('plane0');

// Store a random number
const randomNum = Random.random();

// Bind the random number to the x-axis scale signal of the plane
plane.transform.scaleX = randomNum;
```

## Properties

This module exposes no properties.

## Methods

| Method   | Description                                                                                                                    |
| -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `random` | <p><code>random(): number</code></p><p>Returns a uniformly distributed number between 0.0 (inclusive) and 1.0 (exclusive).</p> |

## Classes

This module exposes no classes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sparkar-community.gitbook.io/docs/randommodule.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
