title: Android - Why Doesn't Android Obey The Pythagorean Theorem?
body: <p>I have a Samsung Galaxy S4 that is 5.0 inches diagonally. I confirmed this both by looking this up on the internet and measuring my phone with a ruler.</p>
  
  <p>By programmatically getting my phone's width and height in pixels, I got the width to be 1080px and the height to be 1920px. My phone's density is 480dpi, which is xxhdpi.</p>
  
  <p>Using this convertor (<a href="https://pixplicity.com/dp-px-converter/" rel="nofollow">https://pixplicity.com/dp-px-converter/</a>), 1920px is 4.00 inches and 1080px is 2.25 inches, all at xxhdpi.</p>
  
  <p>Using the Pythagorean Theorem, the diagonal line in inches for my phone should be approximately 4.59 inches, not 5.00 inches.</p>
  
  <p>The Pythagorean Theorem doesn't rationalize Android's sizing of several of its virtual devices as well. Why is this not adding up? Am I doing the calculations wrong?</p>