# math

## random\_int( min, max ): int

Returns a random integer between the two given numbers

| Type | Name | Description                              |
| ---- | ---- | ---------------------------------------- |
| int  | min  | The minimum number that can be generated |
| int  | max  | The maximum number that can be generated |

```
print( math.random_int( 5, 10 ) );
```

## random\_float( min, max ): float

Returns a random float between the two given numbers

| Type  | Name | Description                              |
| ----- | ---- | ---------------------------------------- |
| float | min  | The minimum number that can be generated |
| float | max  | The maximum number that can be generated |

```
print( math.random_float( 3.25, 9.92 ) );
```

## ticks\_to\_time( ticks ): float

Converts game ticks into time

| Type | Name  | Description                                 |
| ---- | ----- | ------------------------------------------- |
| int  | ticks | The amount of game ticks to convert to time |

```
print( math.ticks_to_time( 64 ) );
```

## time\_to\_ticks( time ): int

Converts time into game ticks

| Type  | Name | Description                                 |
| ----- | ---- | ------------------------------------------- |
| float | time | The amount of time to convert to game ticks |

```
print( math.time_to_ticks( 1.0 ) );
```
