mirror of
https://github.com/glest/glest-source.git
synced 2025-08-31 03:39:54 +02:00
bugfix for both progress and animation smoothness
This commit is contained in:
@@ -232,6 +232,7 @@ void copyStringToBuffer(char *buffer, int bufferSize, const string& s);
|
||||
//numeric fcs
|
||||
int clamp(int value, int min, int max);
|
||||
float clamp(float value, float min, float max);
|
||||
int64 clamp(int64 value, int64 min, int64 max);
|
||||
float saturate(float value);
|
||||
int round(float f);
|
||||
|
||||
|
@@ -727,6 +727,16 @@ int clamp(int value, int min, int max){
|
||||
return value;
|
||||
}
|
||||
|
||||
int64 clamp(int64 value, int64 min, int64 max){
|
||||
if (value<min){
|
||||
return min;
|
||||
}
|
||||
if (value>max){
|
||||
return max;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
float clamp(float value, float min, float max){
|
||||
if (value<min){
|
||||
return min;
|
||||
|
Reference in New Issue
Block a user