Documentation

Math::Clamp

Function

int Math::Clamp(int x, int min, int max)

Clamps the value x between min and max. Throws an exception when min is higher than max.

int x

int min

int max

Returns int
float Math::Clamp(float x, float min, float max)

Clamps the value x between min and max. Throws an exception when min is higher than max.

float x

float min

float max

Returns float