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); }
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 }; }
public void Add(ThreeD rhs) { x += rhs.x; y += rhs.y; z += rhs.z; }