chore: Unify math types, utils and functions (#8389)

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
Márk Tolmács
2024-09-03 00:23:38 +02:00
committed by GitHub
parent e3d1dee9d0
commit f4dd23fc31
98 changed files with 4291 additions and 3661 deletions

View File

@@ -2,6 +2,7 @@ import { vi } from "vitest";
import type { ExcalidrawElementSkeleton } from "./transform";
import { convertToExcalidrawElements } from "./transform";
import type { ExcalidrawArrowElement } from "../element/types";
import { point } from "../../math";
const opts = { regenerateIds: false };
@@ -911,10 +912,7 @@ describe("Test Transform", () => {
x: 111.262,
y: 57,
strokeWidth: 2,
points: [
[0, 0],
[272.985, 0],
],
points: [point(0, 0), point(272.985, 0)],
label: {
text: "How are you?",
fontSize: 20,
@@ -937,7 +935,7 @@ describe("Test Transform", () => {
x: 77.017,
y: 79,
strokeWidth: 2,
points: [[0, 0]],
points: [point(0, 0)],
label: {
text: "Friendship",
fontSize: 20,