MCPcopy Create free account
hub / github.com/DFHack/dfhack / clampMap

Method clampMap

library/modules/Maps.cpp:165–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165cuboid cuboid::clampMap(bool block)
166{
167 if (!Maps::IsValid() || !isValid()) {
168 clear();
169 return *this;
170 }
171
172 int32_t x, y, z;
173 if (block)
174 Maps::getSize(x, y, z);
175 else
176 Maps::getTileSize(x, y, z);
177
178 return clamp(cuboid(0, 0, 0, x-1, y-1, z-1));
179}
180
181bool cuboid::addPos(int16_t x, int16_t y, int16_t z)
182{

Callers 1

forBlockMethod · 0.80

Calls 3

cuboidClass · 0.85
isValidFunction · 0.50
clearFunction · 0.50

Tested by

no test coverage detected