last ...
This commit is contained in:
@@ -2763,6 +2763,47 @@ ENUM_X_MARKET_CYCLES NormalizeCycle(ENUM_X_MARKET_CYCLES value)
|
||||
return value;
|
||||
}
|
||||
|
||||
//
|
||||
// Validate a Buffer Size for Looping or etc ...
|
||||
bool IsValidSize(int size)
|
||||
{
|
||||
//
|
||||
bool result = size > 0;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Normalize Index Based On Specified Buffer ...
|
||||
template <typename T>
|
||||
void NormalizeIndex(
|
||||
int &index,
|
||||
T &buffer[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int bufferSize = ArraySize(buffer);
|
||||
|
||||
//
|
||||
if (bufferSize <= 0)
|
||||
{
|
||||
index = 0;
|
||||
}
|
||||
|
||||
//
|
||||
if (index <= 0)
|
||||
{
|
||||
index = 0;
|
||||
}
|
||||
|
||||
//
|
||||
if (index > bufferSize - 1)
|
||||
{
|
||||
index = bufferSize - 1;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Normalize a give Volume ...
|
||||
double NormalizeVolume(
|
||||
|
||||
Reference in New Issue
Block a user