13 lines
293 B
C++
13 lines
293 B
C++
#include "rm_utility.h"
|
|
|
|
RMUtility::RMUtility()
|
|
{
|
|
|
|
}
|
|
float RMUtility::range(float fmin, float fmax,float tmin, float tmax, float value)
|
|
{
|
|
const float newRange = tmax - tmin;
|
|
const float oldRange = fmax - fmin;
|
|
return ((((value - (fmin)) * newRange) / oldRange) + tmin);
|
|
}
|