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

Function distance

plugins/buildingplan/buildingplan_cycle.cpp:265–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263
264
265static int distance(df::coord pos1, df::coord pos2) {
266 return std::max(abs(pos1.x - pos2.x), abs(pos1.y - pos2.y)) + abs(pos1.z - pos2.z);
267}
268
269static void doVector(color_ostream &out, df::job_item_vector_id vector_id,
270 map<string, Bucket> &buckets,

Callers 2

debug.cppFile · 0.85
doVectorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected