Skip to content

charton API


charton API / @chart-on/core / index / pointInRect

Function: pointInRect() ​

pointInRect(p, a, b, tolerance?): boolean

Defined in: packages/core/src/drawing/geometry.ts:89

Whether p lies in the rectangle spanned by corners a and b, grown by tolerance on every side.

Parameters ​

p ​

Point

a ​

Point

b ​

Point

tolerance? ​

number = 0

Returns ​

boolean