0
I have the following relationship
How do I create a javascript code that counts decimals? For example... if I measure 5.7cm?
The account that would be: subtract 110 from 145 and the result divided by 10. That way I would have the value of each millimeter. Then just multiply by 7 (of 5.7cm) and add to the value in liters associated with 5cm, ie 110 liters.
The result would be 134.50 liters.
I needed a javascript code to do this account. Can someone help me in this nonsense?
Do you have these table numbers in text? for example in an object?
– Sergio
Welcome, please edit your question and add the code you are trying to... Consider taking a [tour] to get the most out of the community. Good luck;)
– MagicHat
So... actually I want to do something really crazy. I don’t have much knowledge of java, so I made a Frankestein with some models I found on the internet. Basically what I wanted was to put the value in cm (including with the decimals 57,4 or 35,9 and etc.) and the page return me the corresponding value (liters). So far I have been able to pull the integers, but I need the decimals. See the project here https://gol-dolm.github.io/CalcD/
– Ghost