Table of Contents

Method Clamp

Namespace
Alternet.Common
Assembly
Alternet.Common.v9.dll

Clamp(int, int, int)

Clamps given value between specified dimensions.

public static int Clamp(int value, int min, int max)

Parameters

value int

Value to probe.

min int

Minimum possible value.

max int

Maximum possible value.

Returns

int

Integer value that does not exceed specified dimensions.

Clamp(double, double, double)

Clamps given value between specified dimensions.

public static double Clamp(double value, double min, double max)

Parameters

value double

Value to probe.

min double

Minimum possible value.

max double

Maximum possible value.

Returns

double

Double value that does not exceed specified dimensions.