code: public void setSpeed(float speed) {
          this.paceInSec = null;
          this.speed = Math.max(0, Math.min(speed, 99.9));
      }
docs: Set the current speed in kilometers per hour or miles per hour.
  
  The possible range is currently limited from 0 to 99.9, inclusive. Values
  larger or smaller than the limits will be transformed into the maximum or
  minimum, respectively.
  
  It will be presented as a decimal number in the UI. The decimal part will be
  rounded to one digit.
  
  Currently pace and speed cannot be presented at the same time. Setting pace
  will discard the value set through speed.
  
  @param speed
  The current speed to set, in kilometers per hour or miles per hour.