private float integrateUp( final float time) { float s = this.speed_up; final boolean forward = this.input.isMovingUp(); if (forward) { s += this.acceleration * time; } final boolean backward = this.input.isMovingDown(); if (backward) { s -= this.acceleration * time; } s = Clamp.clamp(s, -this.maximum_speed, this.maximum_speed); this.camera.cameraMoveUp(s * time); return this.applyDrag(s, time); }
private double integrateUp( final double time) { double s = this.speed_up; final boolean forward = this.input.isMovingUp(); if (forward) { s += this.acceleration * time; } final boolean backward = this.input.isMovingDown(); if (backward) { s -= this.acceleration * time; } s = Clamp.clamp(s, -this.maximum_speed, this.maximum_speed); this.camera.cameraMoveUp(s * time); return this.applyDrag(s, time); }