medievalAspectfunction
A banner's width over its height, from its viewBox: 1.5 for the arms of Aragon's 3 to 2. For keeping a box before the picture is drawn.
Import it
import { medievalAspect } from "@johnmorrisdotca/hata/medieval";
Definition
function medievalAspect(id: string): number | null
Parameters
| Name | Type | Description |
|---|---|---|
id | string | A banner's id, in any case, with or without |
Returns
number | null
The aspect ratio, or null when the set has no such banner.
Examples
import { medievalAspect } from "@johnmorrisdotca/hata/medieval";
console.log(medievalAspect("med:aragon-pallets")); // 1.5
console.log(medievalAspect("med:scotland-saltire")); // 1.66666666666666671.5
1.6666666666666667What it prints (run when this page was built)