src/main/java/de/uapcore/lightpit/entities/IssueSummary.java

changeset 126
4148e6de0f21
parent 116
d24354f21df5
equal deleted inserted replaced
125:decc4c3854a1 126:4148e6de0f21
37 return 100-getActivePercent()-getDonePercent(); 37 return 100-getActivePercent()-getDonePercent();
38 } 38 }
39 39
40 public int getActivePercent() { 40 public int getActivePercent() {
41 int total = getTotal(); 41 int total = getTotal();
42 return total > 0 ? 100*active/total : 0; 42 return total > 0 ? Math.round(100.f*active/total) : 0;
43 } 43 }
44 44
45 public int getDonePercent() { 45 public int getDonePercent() {
46 int total = getTotal(); 46 int total = getTotal();
47 return total > 0 ? 100*done/total : 100; 47 return total > 0 ? Math.round(100.f*done/total) : 100;
48 } 48 }
49 49
50 /** 50 /**
51 * Adds the specified issue to the summary by increming the respective counter. 51 * Adds the specified issue to the summary by increming the respective counter.
52 * @param issue the issue 52 * @param issue the issue

mercurial