Skip to content

Commit

Permalink
Use recursionDepth+1 instead of ++recursionDepth, #139
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Mar 28, 2024
1 parent d5475f9 commit 6cc39f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/common/model/Electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export default class Electron {

// Did we overshoot the curve? If so, call this method recursively.
if ( coilSegmentPosition < 0.0 ) {
this.switchCurves( coilSegmentPosition, ++recursionDepth );
this.switchCurves( coilSegmentPosition, recursionDepth + 1 );
}
else {
this.coilSegmentPosition = coilSegmentPosition;
Expand All @@ -220,7 +220,7 @@ export default class Electron {

// Did we overshoot the curve? If so, call this method recursively.
if ( coilSegmentPosition > 1.0 ) {
this.switchCurves( coilSegmentPosition, ++recursionDepth );
this.switchCurves( coilSegmentPosition, recursionDepth + 1 );
}
else {
this.coilSegmentPosition = coilSegmentPosition;
Expand Down

0 comments on commit 6cc39f4

Please sign in to comment.