I'm having trouble understanding this code:
y -= (1 - (1770 - pencilY) / 225) * 140;
The way I understand calculation in JS:
y += 10; is equal to y = y + 10;
and if I say y = 1 - (1770 - pencilY)
;
What happens is (1770 - pencilY)
gets calculated 1st before the resulting value is calculated against 1
, something like y = 1 - resulting value of 1770 - pencilY
, but still I am unable to figure out that complex equation , its too nested for my understanding , can somebody expalin it to me?
-1
to me.y = y - ((1 - (resulting value of 1770 divided by 225)) * 140)
This isn't working properly:
, please revert to the original line . :D peace .