I made an app in Java with libGDX. I need to use the proportion of the screen's height and 1080. So I created a float called rh which equals Gdx.graphics.getHeight()/1080
float rh = (Gdx.graphics.getHeight()/1080);
In my case my screen's height is 1200 pixels. So in my case rh should be 1.111111... But rh becomes 1. If the screen's height is lower than 1080 pixels, then rh is 0. Why is this happening what could I do?
Please help! Thanks in advance.
P.S: Gdx.graphics.getHeight() gets the height of the screen in nr of pixels.