Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilner committed Sep 11, 2024
1 parent f81e7f6 commit aa79182
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ public static void main(String[] args) throws IOException {
if (time > endTime)
break;
prevIndex = i;
if (slipAtStart==0 && i > 0)
if (slipAtStart==0 && startTime > firstEventTime)
slipAtStart = cumulativeSlipFunc.getY(i-1);
double slip = cumulativeSlipFunc.getY(i) - slipAtStart;
double relTime = cumulativeSlipFunc.getX(i) - startTime;
double relTime = time - startTime;
Preconditions.checkState(relTime >= 0d);
subFunc.set(relTime, slip);
}
funcs.add(subFunc);
Expand Down

0 comments on commit aa79182

Please sign in to comment.