@hydroperx/tiles
Version:
Metro tile layout
19 lines (18 loc) • 462 B
TypeScript
/**
* Determines the side that a moving rectangle hits of another rectangle.
*
* @param moving The moving rectangle.
* @param hitting The rectangle to be hit.
* @returns The side of `hitted` that `draggable` hits.
*/
export declare function side(moving: {
x: number;
y: number;
width: number;
height: number;
}, hitting: {
x: number;
y: number;
width: number;
height: number;
}): "top" | "bottom" | "left" | "right" | null;