@@ -301,7 +301,7 @@ private void makeLegend(String category, Set<Report> toolResults, double x, doub
301
301
// Special hack to make it line up better if the letter is an 'I' or 'i'
302
302
String label = ( ch == 'I' || ch == 'i' ? ch + ": " : "" +ch + ": " );
303
303
double score = or .getResults (category ).score * 100 ;
304
- String msg = "\u25A0 " + label + r .getToolNameAndVersion () + " (" + ( int ) score + "%)" ;
304
+ String msg = "\u25A0 " + label + r .getToolNameAndVersion () + " (" + Math . round ( score ) + "%)" ;
305
305
XYTextAnnotation stroketext3 = new XYTextAnnotation (msg , x , y + i * -3.3 );
306
306
stroketext3 .setTextAnchor (TextAnchor .CENTER_LEFT );
307
307
stroketext3 .setBackgroundPaint (Color .white );
@@ -342,7 +342,7 @@ private void makeLegend(String category, Set<Report> toolResults, double x, doub
342
342
if (!BenchmarkScore .showAveOnlyMode ) {
343
343
// Special hack to make it line up better if the letter is an 'I' or 'i'
344
344
String label = ( ch == 'I' || ch == 'i' ? ch + ": " : "" +ch + ": " );
345
- String msg = "\u25A0 " + label + r .getToolNameAndVersion () + " (" + ( int ) score + "%)" ;
345
+ String msg = "\u25A0 " + label + r .getToolNameAndVersion () + " (" + Math . round ( score ) + "%)" ;
346
346
XYTextAnnotation stroketext4 = new XYTextAnnotation (msg , x , y + i * -3.3 );
347
347
stroketext4 .setTextAnchor (TextAnchor .CENTER_LEFT );
348
348
stroketext4 .setBackgroundPaint (Color .white );
@@ -378,7 +378,7 @@ private void makeLegend(String category, Set<Report> toolResults, double x, doub
378
378
if (commercialToolCount > 1 || (BenchmarkScore .showAveOnlyMode && commercialToolCount == 1 )) {
379
379
commercialAve = commercialTotal / commercialToolCount ;
380
380
XYTextAnnotation stroketext2 = new XYTextAnnotation ("\u25A0 " + ch + ": Commercial Average"
381
- + " (" + ( int ) commercialAve + "%)" , x , y + i * -3.3 );
381
+ + " (" + Math . round ( commercialAve ) + "%)" , x , y + i * -3.3 );
382
382
stroketext2 .setTextAnchor (TextAnchor .CENTER_LEFT );
383
383
stroketext2 .setBackgroundPaint (Color .white );
384
384
stroketext2 .setPaint (Color .magenta );
@@ -413,19 +413,19 @@ public int getCommercialToolCount() {
413
413
}
414
414
415
415
public int getCommercialLow () {
416
- return (int ) commercialLow ;
416
+ return (int ) Math . round ( commercialLow ) ;
417
417
}
418
418
419
419
public TestResults .ToolType getCommercialLowToolType () {
420
420
return commercialLowToolType ;
421
421
}
422
422
423
423
public int getCommercialAve () {
424
- return (int ) commercialAve ;
424
+ return (int ) Math . round ( commercialAve ) ;
425
425
}
426
426
427
427
public int getCommercialHigh () {
428
- return (int ) commercialHigh ;
428
+ return (int ) Math . round ( commercialHigh ) ;
429
429
}
430
430
431
431
public TestResults .ToolType getCommercialHighToolType () {
0 commit comments