---
name: "PGARandomInterval"
section: "3"
platform: "linux"
package: "pgapack"
version: "1.0.0.1-3"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/PGARandomInterval"
---

# PGARandomInterval(3)

returns a uniform random number on the specified interval

## NAME

PGARandomInterval - returns a uniform random number on the specified interval

## INPUT PARAMETERS

- ctx

  \- context variable

- start

  \- starting (integer) value of the interval

- end

  \- ending   (integer) value of the interval

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
int  PGARandomInterval(ctx, start, end)
PGAContext *ctx
int start
int end
```

## LOCATION

random.c

## EXAMPLE

```
Example:
Generate a value uniformly random from the interval [0,99]
PGAContext *ctx;
:
PGARandomInterval(ctx, 0, 99);
```
