Commit 72e271e1 authored by Daniel Lehmberg's avatar Daniel Lehmberg
Browse files

indent code

parent 94b03e24
Pipeline #147361 failed with stages
in 4 minutes and 35 seconds
......@@ -109,26 +109,26 @@ public class Pedestrian extends Agent {
return trajectory;
}
public VPoint getInterpolatedFootStepPosition(double time){
if(this.trajectory.getLastFootSteps().getCapacity() <= 0){
throw new IllegalArgumentException("Cannot interpolate foot steps if there is no capacity (larger than zero) " +
"for storing foot steps (see 'scenario.attributesPedestrian.footStepsToStore' field)");
}
FootStep currentFootStep = this.trajectory.getLastFootSteps().getYoungestFootStep();
if(currentFootStep == null){
return getPosition();
}else{
if(time > currentFootStep.getEndTime()){
// This happens for example if a pedestrian is waiting (see Events)
// TODO: check with Bene K. if this is okay, or a better way?
return currentFootStep.getEnd();
}else{
return FootStep.interpolateFootStep(currentFootStep, time);
}
}
}
public VPoint getInterpolatedFootStepPosition(double time){
if(this.trajectory.getLastFootSteps().getCapacity() <= 0){
throw new IllegalArgumentException("Cannot interpolate foot steps if there is no capacity (larger than zero) " +
"for storing foot steps (see 'scenario.attributesPedestrian.footStepsToStore' field)");
}
FootStep currentFootStep = this.trajectory.getLastFootSteps().getYoungestFootStep();
if(currentFootStep == null){
return getPosition();
}else{
if(time > currentFootStep.getEndTime()){
// This happens for example if a pedestrian is waiting (see Events)
// TODO: check with Bene K. if this is okay, or a better way?
return currentFootStep.getEnd();
}else{
return FootStep.interpolateFootStep(currentFootStep, time);
}
}
}
// Setter
public void setIdAsTarget(int id) { this.idAsTarget = id; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment