PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/WorldView/Structures/PointInt16.cs

#
C# | 45 lines | 40 code | 4 blank | 1 comment | 0 complexity | 3ea176194cd90b1061833f3c2944f9cc MD5 | raw file
  1. using System;
  2. namespace MoreTerra.Structures
  3. {
  4. // A very basic Point class for handling 16-bit Integers.
  5. public struct PointInt16
  6. {
  7. private Int16 _x;
  8. private Int16 _y;
  9. #region Constructors
  10. public PointInt16(Int16 x, Int16 y)
  11. {
  12. _x = x;
  13. _y = y;
  14. }
  15. #endregion
  16. #region GetSet Functions
  17. public Int16 X
  18. {
  19. get
  20. {
  21. return _x;
  22. }
  23. set
  24. {
  25. _x = value;
  26. }
  27. }
  28. public Int16 Y
  29. {
  30. get
  31. {
  32. return _y;
  33. }
  34. set
  35. {
  36. _y = value;
  37. }
  38. }
  39. #endregion
  40. }
  41. }