wasSharp – Diff between revs 3 and 5

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 3 Rev 5
Line 14... Line 14...
14 /// <summary> 14 /// <summary>
15 /// Swaps two integers passed by reference using XOR. 15 /// Swaps two integers passed by reference using XOR.
16 /// </summary> 16 /// </summary>
17 /// <param name="q">first integer to swap</param> 17 /// <param name="q">first integer to swap</param>
18 /// <param name="p">second integer to swap</param> 18 /// <param name="p">second integer to swap</param>
19 public static void wasXORSwap(ref int q, ref int p) 19 public static void XORSwap(ref int q, ref int p)
20 { 20 {
21 q ^= p; 21 q ^= p;
22 p ^= q; 22 p ^= q;
23 q ^= p; 23 q ^= p;
24 } 24 }