mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Master merge
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
parent
b4d8b04d9e
commit
336fa9d002
21 changed files with 189 additions and 157 deletions
|
@ -1,12 +1,12 @@
|
|||
import { cartesian2Polar, polar, radians } from "./angle";
|
||||
import { point } from "./point";
|
||||
import { pointFrom } from "./point";
|
||||
|
||||
describe("cartesian to polar coordinate conversion", () => {
|
||||
it("converts values properly", () => {
|
||||
expect(cartesian2Polar(point(12, 5))).toEqual(
|
||||
expect(cartesian2Polar(pointFrom(12, 5))).toEqual(
|
||||
polar(13, radians(Math.atan(5 / 12))),
|
||||
);
|
||||
expect(cartesian2Polar(point(5, 5))).toEqual(
|
||||
expect(cartesian2Polar(pointFrom(5, 5))).toEqual(
|
||||
polar(5 * Math.sqrt(2), radians(Math.PI / 4)),
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue