fixed precision loss in average computation, close #2016
This commit is contained in:
parent
69ff44dc9f
commit
3d3085dd06
1 changed files with 1 additions and 1 deletions
|
@ -247,7 +247,7 @@ public class PipeTransportPower extends PipeTransport {
|
|||
|
||||
if (totalPowerConsumed > 0) {
|
||||
for (int in = 0; in < 6; ++in) {
|
||||
int powerConsumed = (int) Math.floor(internalPower[in] / totalPowerContained * totalPowerConsumed);
|
||||
int powerConsumed = internalPower[in] * totalPowerConsumed / totalPowerContained;
|
||||
displayPower[in] += powerConsumed;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue