2017-09-24 22:23:22 +00:00
|
|
|
module TK.SpaceTac.Specs {
|
2017-06-22 22:37:38 +00:00
|
|
|
describe("ArenaLocation", () => {
|
|
|
|
it("gets distance and angle between two locations", () => {
|
|
|
|
expect(arenaDistance({ x: 0, y: 0 }, { x: 1, y: 1 })).toBeCloseTo(Math.sqrt(2), 8);
|
|
|
|
expect(arenaAngle({ x: 0, y: 0 }, { x: 1, y: 1 })).toBeCloseTo(Math.PI / 4, 8);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|