| 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?

VulpesRank #55 · 29.2K reputationPosted Jul 6, 2011, 2:06 AM EDT
VulpesRank #55 · 29.2K reputationPosted Jul 5, 2011, 12:10 PM EDT
time and space31 reputationPosted Jul 5, 2011, 3:03 PM EDT
time and space31 reputationPosted Jul 6, 2011, 4:42 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Jul 6, 2011, 12:04 PM EDT
time and space31 reputationPosted Jul 6, 2011, 12:14 PM EDT