title: how to scale absolute coordinates libgdx
body: <p>I am using libgdx to create an android game in which the player can touch a specific part of the screen to move a car left and right on a road. I originally made the game with a height and width of 480 by 800 respectively but when the devices resolution is more or less that what i made it more the touch coordinates are not at the same place. If the a way to scale my coordinates based on the device the game is being played on. The function i use to used calculate the touch points are as followed:</p>
  
  <pre><code>if (Gdx.input.isTouched()) {
  
          if (inBounds(touchedX, touchedY,0, 585, 120, 140)) {
              taxi.moveLeft();
          }
  
          else if (inBounds(touchedX, touchedY, 360, 585, 120, 140)) {
              taxi.moveRight();
          }
  
          else if (inBounds(touchedX, touchedY, 0, 0, 120, 140)) {
              pause();
          }
  
      }
  
      if (!Gdx.input.isTouched()) {
  
          if (inBounds(touchedX, touchedY, 0, 600, 71, 111)) {
              taxi.stopLeft();
  
          }
  
          if (inBounds(touchedX, touchedY, 415, 600, 71, 111)) {
              taxi.stopRight();
  
          }
      }
  </code></pre>
  
  <p>How can I make the coordinates in the inbounds() scale accordingly if the device is larger or smaller than 480 by 800.  </p>