mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 03:13:51 +02:00
Start implementation
This commit is contained in:
+15
@@ -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;
|
||||
};
|
||||
Reference in New Issue
Block a user