Calculating screen height using the Pythagorean Theorem