Reference · Framing, geometry and quiz tools
handleRadiusfunction
A handle's radius in the map's own units, for a window this wide and a share of the usual size.
Import it
import { handleRadius } from "@johnmorrisdotca/chizu";
Definition
function handleRadius(box: { width: number; }, scale: number): number
Parameters
| Name | Type | Description |
|---|---|---|
box | { width: number; } | The window in native map units, or the inset destination specified by this signature. |
scale | number | The geometric scale factor specified by this signature. |
Returns
number
A handle's radius in the map's own units, for a window this wide and a share of the usual size.
Examples
import { handleRadius } from "@johnmorrisdotca/chizu";
// A window 1,000 wide, seen at twice its size.
console.log(handleRadius({ width: 1000 }, 2));
// 9090What it prints (run when this page was built)