示例#1
0
文件: Moon.cs 项目: quinnc/AoC
        public static ThreeD operator +(ThreeD lhs, ThreeD rhs)
        {
            ThreeD result = new ThreeD();

            result.x = lhs.x + rhs.x;
            result.y = lhs.y + rhs.y;
            result.z = lhs.z + rhs.z;

            return(result);
        }
示例#2
0
文件: Moon.cs 项目: quinnc/AoC
 private void Init(int _x, int _y, int _z)
 {
     location = new ThreeD()
     {
         x = _x, y = _y, z = _z
     };
     speed = new ThreeD()
     {
         x = 0, y = 0, z = 0
     };
 }
示例#3
0
文件: Moon.cs 项目: quinnc/AoC
 public void Add(ThreeD rhs)
 {
     x += rhs.x;
     y += rhs.y;
     z += rhs.z;
 }