0

我想计算宽度/高度的显示结果,这个比率总是 0.75 例如:768/1024=0,75

我只有 MegaPixel 6,1 MP 的价值

我怎样才能做到这一点?

4

1 回答 1

1

不是数学:

width*height=megapixels
3*width*height=3*megapixels
3*width=4*height
4*height*height=3*megapixels
height^2=3*megapixels/4
height=sqrt(3*megapixels)/2
width=4/3*height

您可能会遇到错误,因为 6.1 MP 不准确

于 2013-02-17T19:17:39.390 回答