- 2

Difference between x+=dx and x=x+dx?

Is there any difference between x+=dx and x=x+dx? I am curious if these equations might effect code differently?

30th Jan 2017, 7:51 PM
Sushi_Theif
Sushi_Theif - avatar
4 Respuestas
+ 3
its the same
30th Jan 2017, 8:08 PM
Kawaii
Kawaii - avatar
+ 3
it will be just fast to write it..if the variable name is toooo long.
30th Jan 2017, 8:14 PM
Pankaj Vaghela
Pankaj Vaghela - avatar
+ 1
That's what I thought. Thank you both!
30th Jan 2017, 11:06 PM
Sushi_Theif
Sushi_Theif - avatar
+ 1
it is same but time required to do x+=dx is less because there is no multiple declaration of x
1st Feb 2017, 6:11 PM
Wazed Ali Gazi
Wazed Ali Gazi - avatar