@antv/g2
Version:
the Grammar of Graphics in Javascript
27 lines (26 loc) • 655 B
TypeScript
import { AABB } from '@antv/g';
import { Vector2 } from './vector';
type Min = Vector2;
type Max = Vector2;
export type Bounds = [Min, Max];
export declare function parseAABB(min2: AABB): Bounds;
/**
* Whether the `point` in `bounds`.
* @param point
* @param bounds
*/
export declare function isInBounds(point: Vector2, bounds: Bounds): boolean;
/**
* Whether `b1` is overflow from `b2`.
* @param b1
* @param b2
*/
export declare function isOverflow(b1: Bounds, b2: Bounds): boolean;
/**
* Whether `b1` is overlap with `b2`.
* @param b1
* @param b2
* @returns
*/
export declare function isOverlap(b1: Bounds, b2: Bounds): boolean;
export {};