Hi,
I realy hope I'm writing it in the right place.
I'm a web developer and I am breaking my head over the mathematics for a feature I am trying to build.
Im calculating the ratio between two elements on the screen and I need to set the size of another element based on that ratio, as smaller the ratio the bigger the size.
I plugged in manually some numbers for the size for random ratios and I figured out the following:
- for the ratio of 0.13 the right size is 95
- ratio 0.19, size 62
- ratio 0.24, size 55
- ratio 0.33, size 45
- ratio 0.48, size 42
- ratio 0.55, size 32
- ratio 0.64, size 25
- ratio 0.79, size 20
- ratio 0.94, size 12
Basiclly I just need to figure out the right equation that will produce the size from a given ratio based on the examples above.
I really appreciate your help. ?
I realy hope I'm writing it in the right place.
I'm a web developer and I am breaking my head over the mathematics for a feature I am trying to build.
Im calculating the ratio between two elements on the screen and I need to set the size of another element based on that ratio, as smaller the ratio the bigger the size.
I plugged in manually some numbers for the size for random ratios and I figured out the following:
- for the ratio of 0.13 the right size is 95
- ratio 0.19, size 62
- ratio 0.24, size 55
- ratio 0.33, size 45
- ratio 0.48, size 42
- ratio 0.55, size 32
- ratio 0.64, size 25
- ratio 0.79, size 20
- ratio 0.94, size 12
Basiclly I just need to figure out the right equation that will produce the size from a given ratio based on the examples above.
I really appreciate your help. ?