first commit
This commit is contained in:
12
project/fm_viewer/core/rm_utility.cpp
Normal file
12
project/fm_viewer/core/rm_utility.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user