Can this code (that proportionally scales image to fill/cover rectangle) be optimized?

前端 未结 0 662
我在风中等你
我在风中等你 2020-12-08 03:57

I\'m not really good at this math related things, so it turned out to be kinda long.

imageRatio = imageWidth / imageHeight

if (imageWidth > imageHeight) {         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题