Reference · Framing, geometry and quiz tools
portTierForfunction
The tier a window shows: 1 across more than 3,000 km, 2 across more than 1,000 km, else 3.
Import it
import { portTierFor } from "@johnmorrisdotca/chizu";
Definition
function portTierFor(kilometres: number): 1 | 2 | 3
Parameters
| Name | Type | Description |
|---|---|---|
kilometres | number | The ground the window shows across, in kilometres ( |
Returns
1 | 2 | 3
1, 2 or 3.
Examples
import { portTierFor } from "@johnmorrisdotca/chizu";
console.log(portTierFor(8000), portTierFor(2000), portTierFor(300));
// 1 2 31 2 3What it prints (run when this page was built)