Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Feb 2, 2022
1 parent 96d912e commit 3528af7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ private void update(boolean changedMax) {
}

private int roundHysteresis(int old, double newExact) {
double mod = newExact%1;
final double THRESHOLD = .1;
int floor = (int) Math.floor(newExact);
if (floor == old) {
return old;
}
if (old<newExact && mod>THRESHOLD) {
if(old < 0) {
return floor;
} else if (old>newExact && mod<1-THRESHOLD) {
}
if (newExact > old + 1 + THRESHOLD || newExact < old - THRESHOLD) {
return floor;
}
return old;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public List<BlockFace> getEnergyConnections() {
}

protected double getMaxBuffer() {
return 10e3;//200kW
return 87148.9361702F;//4096RF
}

protected boolean has4Phases() {
Expand Down

0 comments on commit 3528af7

Please sign in to comment.