private double integrateForward( final double time) { double s = this.speed_forward; final boolean forward = this.input.isMovingForward(); if (forward) { s += this.acceleration * time; } final boolean backward = this.input.isMovingBackward(); if (backward) { s -= this.acceleration * time; } s = Clamp.clamp(s, -this.maximum_speed, this.maximum_speed); this.camera.cameraMoveForward(s * time); return this.applyDrag(s, time); }
private float integrateForward( final float time) { float s = this.speed_forward; final boolean forward = this.input.isMovingForward(); if (forward) { s += this.acceleration * time; } final boolean backward = this.input.isMovingBackward(); if (backward) { s -= this.acceleration * time; } s = Clamp.clamp(s, -this.maximum_speed, this.maximum_speed); this.camera.cameraMoveForward(s * time); return this.applyDrag(s, time); }