Big Tony
BigTony.Utility.Mathi Class Reference

Static Public Member Functions

static float Clamp (int val, int min, int max)
 Clamp an integer between a maximum and minimum amount. More...
 
static int Max (int a, int b)
 Get the highest value between two inputted integers. More...
 
static int Min (int a, int b)
 Get the lowest value between two inputted integers. More...
 
static int Abs (int a)
 Get the absolute value of the inputted integer. More...
 

Member Function Documentation

◆ Abs()

static int BigTony.Utility.Mathi.Abs ( int  a)
inlinestatic

Get the absolute value of the inputted integer.

Parameters
aThe integer to get the absolute value of.
Returns
The absolute value of 'a'.

◆ Clamp()

static float BigTony.Utility.Mathi.Clamp ( int  val,
int  min,
int  max 
)
inlinestatic

Clamp an integer between a maximum and minimum amount.

Parameters
valThe value of the integer that needs to be clamped.
minThe minimum amount that 'val' can be, as an integer.
maxThe maximum amount that 'val' can be, as an integer.
Returns
A clamped value of 'val' between 'min' and 'max'.

◆ Max()

static int BigTony.Utility.Mathi.Max ( int  a,
int  b 
)
inlinestatic

Get the highest value between two inputted integers.

Parameters
aThe first integer to be compared.
bThe second integer to be compared.
Returns
The highest value between 'a' and 'b'.

◆ Min()

static int BigTony.Utility.Mathi.Min ( int  a,
int  b 
)
inlinestatic

Get the lowest value between two inputted integers.

Parameters
aThe first integer number to be compared.
bThe second integer number to be compared.
Returns
The lowest value between 'a' and 'b'.