Reference · Framing, geometry and quiz tools
mapDiagonalfunction
The corner-to-corner length of a map's canvas, which proximity is measured against.
Import it
import { mapDiagonal } from "@johnmorrisdotca/chizu";
Definition
function mapDiagonal(map: Pick<ChizuMap, "width" | "height">): number
Parameters
| Name | Type | Description |
|---|---|---|
map | Pick<ChizuMap, "width" | "height"> | The native map or map fields required by this signature; coordinates and region codes belong to its canvas. |
Returns
number
The corner-to-corner length of a map's canvas, which proximity is measured against.
Examples
import { mapDiagonal } from "@johnmorrisdotca/chizu";
console.log(mapDiagonal({ width: 300, height: 400 }));
// 500500What it prints (run when this page was built)