auto-sync
This commit is contained in:
parent
032a12edca
commit
961716d6c2
|
@ -235,8 +235,14 @@ float interpolate3d(float x, float xBin[], int xBinSize, float y, float yBin[],
|
|||
if (needInterpolationLogging)
|
||||
printf("X is smaller than smallest cell in table: %dr\n", xIndex);
|
||||
#endif
|
||||
// no interpolation should be fine here.
|
||||
if (yIndex == yBinSize - 1)
|
||||
return map[0][yIndex];
|
||||
float keyMin = yBin[yIndex];
|
||||
float keyMax = yBin[yIndex + 1];
|
||||
float rpmMinValue = map[0][yIndex];
|
||||
float rpmMaxValue = map[0][yIndex + 1];
|
||||
|
||||
return interpolate(keyMin, rpmMinValue, keyMax, rpmMaxValue, y);
|
||||
}
|
||||
|
||||
if (yIndex < 0) {
|
||||
|
|
Loading…
Reference in New Issue