Start implementation

This commit is contained in:
Vanilagy
2024-11-09 21:50:31 +01:00
parent 9a35288c17
commit dd6526a070
21 changed files with 6735 additions and 69 deletions
+15
View File
@@ -0,0 +1,15 @@
export function assert(x: unknown): asserts x {
if (!x) {
throw new Error('Assertion failed.');
}
}
export type TransformationMatrix = [number, number, number, number, number, number, number, number, number];
export const last = <T>(arr: T[]) => {
return arr && arr[arr.length - 1];
};
export const isU32 = (value: number) => {
return value >= 0 && value < 2**32;
};