@irysius/grid-math
Version:
Tools to assist with grid math and algorithms
15 lines • 735 B
TypeScript
declare module "@irysius/grid-math/Rect" {
import { ISize } from "@irysius/grid-math/Size";
export interface IRect extends ISize {
x: number;
y: number;
type?: string;
}
export function create(x: number, y: number, width: number, height: number, type?: string): IRect;
export function empty(type?: string): IRect;
export function fromClientBounds(v: any): IRect;
export function isRect(v: any, typeToCheck?: string | any): v is IRect;
export function areEqual(a: IRect, b: IRect, ignoreType?: boolean): boolean;
export function closeEnough(e: number): (a: IRect, b: IRect, ignoreType?: boolean) => boolean;
export function clone<T extends IRect>(v: T): T;
}