Fix to the Y axis lookup max/mins

This commit is contained in:
Josh Stewart 2013-12-29 13:03:16 +11:00
parent 07018da78d
commit 03cbef0837
1 changed files with 4 additions and 3 deletions

View File

@ -66,8 +66,8 @@ int getTableValue(struct table fromTable, int Y, int X)
}
//Loop through the Y axis bins for the min/max pair
int yMinValue = fromTable.axisY[0];
int yMaxValue = fromTable.axisY[fromTable.ySize-1];
int yMaxValue = fromTable.axisY[0];
int yMinValue = fromTable.axisY[fromTable.ySize-1];
int yMin = 0;
int yMax = 0;
@ -118,8 +118,9 @@ int getTableValue(struct table fromTable, int Y, int X)
//Create some normalised position values
//These are essentially percentages (between 0 and 1) of where the desired value falls between the nearest bins on each axis
/*
// Float version
/*
float p = ((float)(X - xMinValue)) / (float)(xMaxValue - xMinValue);
float q = ((float)(Y - yMaxValue)) / (float)(yMinValue - yMaxValue);