Reference · Framing, geometry and quiz tools
CalloutObstacletype
A box, which is what a leader is kept off and what the credit's corner is.
Import it
import type { CalloutObstacle } from "@johnmorrisdotca/chizu";
Definition
type CalloutObstacle = {
minX: number;
minY: number;
maxX: number;
maxY: number;
};
Members
| Name | Type | Description |
|---|---|---|
minX | number | |
minY | number | |
maxX | number | |
maxY | number |
Examples
import { segmentCrossesBox, type CalloutObstacle } from "@johnmorrisdotca/chizu";
const credit: CalloutObstacle = { minX: 80, minY: 90, maxX: 100, maxY: 100 };
console.log(segmentCrossesBox([70, 95], [99, 95], credit));
// truetrueWhat it prints (run when this page was built)