Each panel produces 10 kW, so 7 should produce 70, but you get 69.9 instead.
[0.14.14] Solar panel module power doesn't add up properly
Re: [0.14.14] Solar panel module power doesn't add up properly
Thanks for the report,
I can reproduce the rounding issue:
I can reproduce the rounding issue:
Re: [0.14.14] Solar panel module power doesn't add up properly
Ahh floating point numbers
Solar panels actually don't produce 10 KW. They produce some finite number *just* below 10 KW but the conversion to a string doesn't care when the number is that small so it shows 10. As you add together several of the *just below* 10 KW values the gap increases and the conversion to string shows that they don't actually produce that much.
It's similar to the fluid issue where 4999.999999 fluid is not technically 5000 fluid but converting it to a string as 4.9k is off by a wide margin so it would get rounded to 5k.
Basically what I'm saying is: there's no simple fix
Solar panels actually don't produce 10 KW. They produce some finite number *just* below 10 KW but the conversion to a string doesn't care when the number is that small so it shows 10. As you add together several of the *just below* 10 KW values the gap increases and the conversion to string shows that they don't actually produce that much.
It's similar to the fluid issue where 4999.999999 fluid is not technically 5000 fluid but converting it to a string as 4.9k is off by a wide margin so it would get rounded to 5k.
Basically what I'm saying is: there's no simple fix
If you want to get ahold of me I'm almost always on Discord.