MCPcopy Create free account
hub / github.com/algorithmzuo/algorithm-journey / better

Method better

src/class187/Code05_Passage1.java:308–317  ·  view source on GitHub ↗
(int curx, int cury, long curxv, long curyv)

Source from the content-addressed store, hash-verified

306 public static long bestDist;
307
308 public static void better(int curx, int cury, long curxv, long curyv) {
309 if (curx == 0 || cury == 0) {
310 return;
311 }
312 long curDist = getDist(curx, cury, curxv, curyv);
313 if (curDist > bestDist) {
314 x = curx; y = cury; xv = curxv; yv = curyv;
315 bestDist = curDist;
316 }
317 }
318
319 public static void mergeInfo(int i, int j, int op) {
320 getInfo(i, j, op, op);

Callers 1

mergeInfoMethod · 0.95

Calls 1

getDistMethod · 0.95

Tested by

no test coverage detected