SHARE
TWEET

Untitled

a guest Oct 13th, 2019 2,049 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     /***
  2.    *@author Patrik Demjan
  3.    *@version 1337.kvuli.validatoru
  4.    */
  5.  
  6.  
  7. // class //
  8. public class Ppa1u01b {
  9.  
  10.     // main //
  11.     public static void main(String[] args) {
  12.        
  13.         int hSize =520;
  14.         int vSize =297;
  15.         int hResolution = 1920;
  16.         int vResolution = 1080;
  17.         final String url = "www.samsung.com/us/support/owners/product/led-monitor-sf350-sf351-series";
  18.  
  19.     // Spočtení hPPI a vPPI //
  20.         double hPPI = (hResolution/(hSize/25.4));
  21.         double vPPI = (vResolution/(vSize/25.4));
  22.  
  23.     // Poměř horizontálního ku veritáknílmu PPI //
  24.         double rPPI = vPPI/hPPI;
  25.  
  26.     // Horizontální rozteč bodů //
  27.         double pitch = (double) hSize / hResolution;
  28.  
  29.     // Velikost obrázku//
  30.         double width = 200 * pitch;
  31.         double height = 100 * pitch;
  32.  
  33.     // Výpis hodnot //
  34.         System.out.println("hSize [mm] = " + hSize);
  35.         System.out.println("vSize [mm] = " + vSize);
  36.         System.out.println("hResolution [pixels] = " + hResolution);
  37.         System.out.println("vResolution [pixels] = " + vResolution);
  38.         System.out.println("______________");
  39.  
  40.         System.out.println("hPPI = " + hPPI);
  41.         System.out.println("vPPI = " + vPPI);
  42.         System.out.println("rPPI = " + rPPI);
  43.         System.out.println("pitch [mm] = " + pitch);
  44.         System.out.println("width [mm] = " + width);
  45.         System.out.println("height [mm] = " + height);
  46.         System.out.println("url: " + url);
  47.  
  48.     }
  49. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top