ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/util.h
(Generate patch)

Comparing libgender/util.h (file contents):
Revision 1.58 by root, Mon Nov 1 20:11:35 2004 UTC vs.
Revision 1.59 by root, Tue Nov 9 22:24:14 2004 UTC

26{ 26{
27 soffs x, y, z; 27 soffs x, y, z;
28 28
29 sector (soffs x, soffs y, soffs z) : x(x), y(y), z(z) { }; 29 sector (soffs x, soffs y, soffs z) : x(x), y(y), z(z) { };
30 sector (soffs xyz = 0) : x(xyz), y(xyz), z(xyz) { }; 30 sector (soffs xyz = 0) : x(xyz), y(xyz), z(xyz) { };
31
32 void offset (int subindex, uoffs extent)
33 {
34 if (subindex & 1) x += extent;
35 if (subindex & 2) y += extent;
36 if (subindex & 4) z += extent;
37 }
38}; 31};
39 32
40inline sector operator +(const sector &a, const sector &b) 33inline sector operator +(const sector &a, const sector &b)
41{ 34{
42 return sector (a.x + b.x, a.y + b.y, a.z + b.z); 35 return sector (a.x + b.x, a.y + b.y, a.z + b.z);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines