Reference · Rockets, variants, parts and the fit check
markingWidthfunction
How wide a text is in metres at a capital height: the width the marking will take on a hull, so a ship can centre it, fit it between hatches or keep it clear of a seam.
Import it
import { markingWidth } from "@johnmorrisdotca/uchusen-rockets";
Definition
function markingWidth(text: string, height: number, style?: MarkingStyle): number
Parameters
| Name | Type | Description |
|---|---|---|
text | string | What is written. |
height | number | The height of a capital letter, in metres. |
style (optional) | MarkingStyle |
|
Returns
number
The width in metres.
Examples
import { markingWidth } from "@johnmorrisdotca/uchusen-rockets";
console.log(markingWidth("ISV KAMINARI", 1.5).toFixed(1));21.9What it prints (run when this page was built)