2010-08-11 12 views

risposta

35

Definizione del rapporto:

ratio = width/height

Formula:

height = width/ratio = 240/2.40 = 100

+4

E width = altezza * Rapporto – Marian07

+2

Questa risposta potrebbe anche essere utile http://stackoverflow.com/questions/8014478/169-aspect-ratio-with-fixed-width#answer-8014510 – Marian07

0

esempio di calcolo 2:40. usando il linguaggio di programmazione javascript.

var width = 240 ; 
var rat1 = 2; 
var rat2 = 40; 

var ratio = width/rat1; 
var calculated_height = ratio * rat2; 
Problemi correlati