Guest User

Untitled

a guest
Jun 20th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. decimal startAngle = Convert.ToDecimal(159.9);
  2. decimal stopAngle = Convert.ToDecimal(355.87);
  3.  
  4. //swap each:
  5. //startAngle becomes: 355.87
  6. //stopAngle becomes: 159.9
  7.  
  8. startAngle = startAngle+stopAngle;
  9. stopAngle = startAngle-stopAngle;
  10. startAngle = startAngle-stopAngle;
  11.  
  12. decimal startAngle = Convert.ToDecimal(159.9);
  13. decimal stopAngle = Convert.ToDecimal(355.87);
  14.  
  15. decimal tempDecimal = startAngle;
  16. startAngle = stopAngle;
  17. stopAngle = tempDecimal;
  18.  
  19. stopAngle = Convert.ToDecimal(159.9);
  20. startAngle = Convert.ToDecimal(355.87);
  21.  
  22. int x = 42;
  23. int y = 51236;
  24. x ^= y;
  25. y ^= x;
  26. x ^= y;
  27.  
  28. int a = 4, b = 6;
  29.  
  30. a^= b^= a^= b;
  31.  
  32. float startAngle = 159.9F;
  33. float stopAngle = 355.87F;
  34.  
  35. startAngle = startAngle * stopAngle;
  36. stopAngle = startAngle / stopAngle;
  37. startAngle = startAngle / stopAngle;
  38.  
  39. static bool Swap<T>(ref T x, ref T y)
  40. {
  41. try
  42. {
  43. T t = y;
  44. y = x;
  45. x = t;
  46. return true;
  47. }
  48. catch
  49. {
  50. return false;
  51. }
  52. }
  53.  
  54. float startAngle = 159.9F
  55. float stopAngle = 355.87F
  56. Swap<float>(ref startAngle, ref stopAngle);
  57.  
  58. MyObject obj1 = new MyObject("object1");
  59. MyObject obj2 = new MyObject("object2");
  60. Swap<MyObject>(ref obj1, ref obj2);
  61.  
  62. a %= b %= a %= b;
  63.  
  64. y^=x^=y^=x;
  65.  
  66. x^=y^=x;y^=x;
Add Comment
Please, Sign In to add comment