2010-08-11 3 views

Répondre

35

Définition du rapport:

ratio = width/height

Formule:

height = width/ratio = 240/2.40 = 100

+4

Et width = hauteur * rapport – Marian07

+2

Cette réponse peut aussi être utile http://stackoverflow.com/questions/8014478/169-aspect-ratio-with-fixed-width#answer-8014510 – Marian07

0

exemple de calcul de 02:40. en utilisant le langage de programmation javascript.

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

var ratio = width/rat1; 
var calculated_height = ratio * rat2; 
Questions connexes