[ya-day1] 6 1 A yandex solution

This commit is contained in:
2024-11-10 16:14:35 +03:00
parent 5c452053f5
commit 052a872f46
2 changed files with 25 additions and 8 deletions
@@ -22,3 +22,20 @@ export function toGetClosestPoint(
return direction;
}
// export function toGetClosestPoint(
// x1: number,
// y1: number,
// x2: number,
// y2: number,
// sx: number,
// sy: number,
// ) {
// let direction: Direction = "" as Direction;
// if (sy > y2) direction += "N"
// if (sy < y1) direction += "S";
// if (sx < x1) direction += "W"
// if (sx > x2) direction += "E"
// return direction;
// }