[ya-day1] 6 1 A yandex solution
This commit is contained in:
@@ -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;
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user