# gammaDistribution

> **gammaDistribution**(`parameters`): [`GammaDistribution`](/reference/knotkit/distribution/interfaces/gammadistribution/)

Defined in: [packages/distribution/src/gamma-distribution.ts:30](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/distribution/src/gamma-distribution.ts#L30)

Create a gamma distribution with the given shape and rate. Each rejection draw consumes a variable number of 32-bit words. Shapes below one use a log-space boost. A positive draw beneath binary64’s range rounds to the smallest positive double.

## Parameters

### parameters

[`GammaDistributionParameters`](/reference/knotkit/distribution/interfaces/gammadistributionparameters/)

## Returns

[`GammaDistribution`](/reference/knotkit/distribution/interfaces/gammadistribution/)

## Throws

With `INVALID_PARAMETER` for an unsupported shape or rate.
