… | |
… | |
105 | if (subindex & 1) x += extent; |
105 | if (subindex & 1) x += extent; |
106 | if (subindex & 2) y += extent; |
106 | if (subindex & 2) y += extent; |
107 | if (subindex & 4) z += extent; |
107 | if (subindex & 4) z += extent; |
108 | } |
108 | } |
109 | }; |
109 | }; |
|
|
110 | |
|
|
111 | inline const sector operator +(const sector &a, const sector &b) |
|
|
112 | { |
|
|
113 | return sector (a.x + b.x, a.y + b.y, a.z + b.z); |
|
|
114 | } |
|
|
115 | |
|
|
116 | inline const sector operator -(const sector &a, const sector &b) |
|
|
117 | { |
|
|
118 | return sector (a.x - b.x, a.y - b.y, a.z - b.z); |
|
|
119 | } |
110 | |
120 | |
111 | inline const sector translate (const sector &p, const sector &src, const sector &dst) |
121 | inline const sector translate (const sector &p, const sector &src, const sector &dst) |
112 | { |
122 | { |
113 | sector r; |
123 | sector r; |
114 | |
124 | |