| oldPosition = new Vector2(position.X, position.Y); |
OR
| oldPosition.X = position.X; |
| oldPosition.Y = position.Y; |
I'm assuming the second example is more efficient since a new object isn't being created, unless the compiler automatically optimises such things?
VulpesPosted Jul 6, 2011, 6:06 AM
time and spacePosted Jul 6, 2011, 4:14 PM
Sam HobbsPosted Jul 6, 2011, 4:04 PM
time and spacePosted Jul 6, 2011, 8:42 AM
time and spacePosted Jul 5, 2011, 7:03 PM
VulpesPosted Jul 5, 2011, 4:10 PM