Reference · Framing, geometry and quiz tools
isMapZoomfunction
Whether a number is one of the zoom steps.
Import it
import { isMapZoom } from "@johnmorrisdotca/chizu";
Definition
function isMapZoom(value: number): value is MapZoom
Parameters
| Name | Type | Description |
|---|---|---|
value | number | The number to test against the native zoom ladder. |
Returns
boolean
Whether a number is one of the zoom steps.
Examples
import { isMapZoom } from "@johnmorrisdotca/chizu";
console.log(isMapZoom(3), isMapZoom(2.5), isMapZoom(11));
// true false falsetrue false falseWhat it prints (run when this page was built)