UNPKG

655 BTypeScriptView Raw
1import { AABB } from '@antv/g';
2import { Vector2 } from './vector';
3type Min = Vector2;
4type Max = Vector2;
5export type Bounds = [Min, Max];
6export declare function parseAABB(min2: AABB): Bounds;
7/**
8 * Whether the `point` in `bounds`.
9 * @param point
10 * @param bounds
11 */
12export declare function isInBounds(point: Vector2, bounds: Bounds): boolean;
13/**
14 * Whether `b1` is overflow from `b2`.
15 * @param b1
16 * @param b2
17 */
18export declare function isOverflow(b1: Bounds, b2: Bounds): boolean;
19/**
20 * Whether `b1` is overlap with `b2`.
21 * @param b1
22 * @param b2
23 * @returns
24 */
25export declare function isOverlap(b1: Bounds, b2: Bounds): boolean;
26export {};