There's one bug that I create at literally every opportunity that comes up for me to create it. if (x != prev_x && y != prev_y){ IsNewPosition(); }
Generally speaking you would store your x,y pairs as v2s or v2u to begin with, so you wouldn't have to keep packing them all the time, in either language.
-
-
Exactly. I haven't developed the habit of always doing vectors from the start, but I always notice how glad I am to have everything in vectors when I happen to do it/switch to it.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
What would be v2s? A struct? You mean to implement a function that compares two structs member-wise? Or am I missing something?
-
v2s is probably: struct v2s { int x, y;}; "=" has either been overloaded, or maybe he's saying that the language when comparing two instances of the same struct should autogenerate comparisons for each member.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.