readAirThickness関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a page's air-thickness attribute means: a number from 1 (the true thickness) to 5, given as it is written; with none, or something that is not a number, AIR_THICKNESS_DEFAULT. A number outside the range is brought to its nearest end.
インポート
import { readAirThickness } from "@johnmorrisdotca/chikyu-earth/realistic";
定義
function readAirThickness(given: string | null): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
given | string | null | The attribute's value, or |
戻り値
number
How many times its real thickness the air is drawn, between 1 and 5.
例
import { readAirThickness } from "@johnmorrisdotca/chikyu-earth/realistic";
console.log(readAirThickness(null), readAirThickness("1"), readAirThickness("9"));3 1 5出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。