Okay, so today I was working on updating dual snot, and I put this script in that is supposed to average two variables:
set [avg. variable v] to (((variable 1) + (variable2)) / 2)I think that the by the way the forums doesn't process it right is enough proof to show you guy's that it didn't work.
It took one of the numbers and set the average to that. So instead of using that script I used distributive property and divided both variables by 2 before adding them. I hope that this glitch will be fixed in Scratch 2.0.
Offline
nitromian wrote:
Okay, so today I was working on updating dual snot, and I put this script in that is supposed to average two variables:
set [avg. variable v] to (((variable 1) + (variable2)) / 2)I think that the by the way the forums doesn't process it right is enough proof to show you guy's that it didn't work.It took one of the numbers and set the average to that. So instead of using that script I used distributive property and divided both variables by 2 before adding them. I hope that this glitch will be fixed in Scratch 2.0.
set [avg. variable v] to (((variable 1) + (variable2)) / (2))
set [avg. variable v] to (((variable 1) + (variable2)) / (2))
You need to put parentheses around the final 2
Last edited by jvvg (2012-12-12 22:12:29)
Offline