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

Function is_in_range

plugins/siege-engine.cpp:177–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177static bool is_in_range(const coord_range &target, df::coord pos)
178{
179 return target.first.isValid() && target.second.isValid() &&
180 target.first.x <= pos.x && pos.x <= target.second.x &&
181 target.first.y <= pos.y && pos.y <= target.second.y &&
182 target.first.z <= pos.z && pos.z <= target.second.z;
183}
184
185static std::pair<int, int> get_engine_range(df::building_siegeenginest *bld, float quality)
186{

Callers 2

onTargetMethod · 0.85
paintAimScreenFunction · 0.85

Calls 1

isValidMethod · 0.45

Tested by

no test coverage detected