Skip to content

Commit a200683

Browse files
committed
refactor: s/SingleLineDistance/EuclideanDistance/g
1 parent d3bd935 commit a200683

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

2025/day/8/distances.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import calculateSingleLineDistance from "@lib/calculateSingleLineDistance.ts";
1+
import calculateEuclideanDistance from "@lib/calculateEuclideanDistance.ts";
22

33
export function calculateDistances(boxes: number[][]) {
44
const distances = new Map<number, Set<(typeof boxes)[number]>>();
55
for (let i = 0; i < boxes.length; i++) {
66
const a = boxes[i];
77
for (let j = i + 1; j < boxes.length; j++) {
88
const b = boxes[j];
9-
const distance = Math.abs(calculateSingleLineDistance(a, b));
9+
const distance = Math.abs(calculateEuclideanDistance(a, b));
1010
distances.set(distance, new Set([a, b]));
1111
}
1212
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default function calculateSingleLineDistance(
1+
export default function calculateEuclideanDistance(
22
a: readonly number[],
33
b: readonly number[],
44
) {

0 commit comments

Comments
 (0)