Skip to content

Commit 9970f33

Browse files
committed
document mpr::solidcube::center
1 parent 32e8801 commit 9970f33

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/engine/world/mpr.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ namespace mpr
4141
SolidCube(const vec &o, int size) : o(o), size(size) {}
4242
SolidCube(const ivec &o, int size) : o(o), size(size) {}
4343

44+
/**
45+
* @brief Returns SolidCube::o plus half of size.
46+
*
47+
* Returns value equal to elementwise sum of size/2 and o. That is, half
48+
* of size is added to each of o's x, y, z fields.
49+
*
50+
* @return vec containing sum of o, size/2
51+
*/
4452
vec center() const;
4553
vec supportpoint(const vec &n) const;
4654
};

0 commit comments

Comments
 (0)