[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
@@ -2,35 +2,35 @@ import { describe, it, expect } from "vitest";
import { toGetClosestPoint } from "./toGetClosestPoint.ts";
describe("toGetClosestPoint", () => {
it("toGetClosestPoint equale NW", () => {
it("-1, -2, 5, 3, -4, 6 equale NW", () => {
expect(toGetClosestPoint(-1, -2, 5, 3, -4, 6)).toBe("NW");
});
it("toGetClosestPoint equale N", () => {
it("-1, -2, 5, 3, 4, 5 equale N", () => {
expect(toGetClosestPoint(-1, -2, 5, 3, 4, 5)).toBe("N");
});
it("toGetClosestPoint equale NE", () => {
it("-1, -2, 5, 3, 9, 3 equale NE", () => {
expect(toGetClosestPoint(-1, -2, 5, 3, 9, 3)).toBe("NE");
});
it("toGetClosestPoint equale E", () => {
it("-1, -2, 5, 3, 7, 0 equale E", () => {
expect(toGetClosestPoint(-1, -2, 5, 3, 7, 0)).toBe("E");
});
it("toGetClosestPoint equale SE", () => {
it("-1, -2, 5, 3, 8, -4 equale SE", () => {
expect(toGetClosestPoint(-1, -2, 5, 3, 8, -4)).toBe("SE");
});
it("toGetClosestPoint equale S", () => {
it("-1, -2, 5, 3, 2, -4 equale S", () => {
expect(toGetClosestPoint(-1, -2, 5, 3, 2, -4)).toBe("S");
});
it("toGetClosestPoint equale SW", () => {
it("-1, -2, 5, 3, -5, -2 equale SW", () => {
expect(toGetClosestPoint(-1, -2, 5, 3, -5, -2)).toBe("SW");
});
it("toGetClosestPoint equale W", () => {
it("-1, -2, 5, 3, -5, 2 equale W", () => {
expect(toGetClosestPoint(-1, -2, 5, 3, -5, 2)).toBe("W");
});
});