fix truncation not always happening correctly
This commit is contained in:
@@ -96,7 +96,7 @@ void PercentageDisplay::Refresh()
|
||||
{
|
||||
// TRICKY: printf will round, but we want to truncate. Otherwise, we may display a percent
|
||||
// score that's too high and doesn't match up with the calculated grade.
|
||||
float fTruncInterval = powf(0.1f, (float) PERCENT_TOTAL_SIZE);
|
||||
float fTruncInterval = powf(0.1f, (float) PERCENT_TOTAL_SIZE-1);
|
||||
fPercentDancePoints = ftruncf( fPercentDancePoints, fTruncInterval );
|
||||
|
||||
sNumToDisplay = ssprintf( "%*.*f%%", (int) PERCENT_TOTAL_SIZE, (int) PERCENT_DECIMAL_PLACES, fPercentDancePoints*100 );
|
||||
|
||||
Reference in New Issue
Block a user