fivem-ts

a library to speed up the development of Fivem scripts and frameworks


Project maintained by Purpose-Dev Hosted on GitHub Pages — Theme by mattgraham

fivem-ts - Documentation v0.7.5Docs


fivem-ts - Documentation v0.7.5 / Shared / normalize

Function: normalize()

normalize(value, min, max): number

Normalizes a value within a given range to a value between 0 and 1.

Parameters

value: number

The value to normalize.

min: number

The minimum value of the range.

max: number

The maximum value of the range.

Returns

number

The normalized value.

Example

normalize(75, 50, 100); // 0.5

Defined in

shared/utils/FMath.ts:147