streaksPerSecond関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
How many streaks a second are drawn for a mean hourly rate over the dark part of the view: 2.5 a second where the whole view is dark on a
night with no shower, more with a shower but squeezed (the 0.6th power) and never over nine, none where nothing in view is dark.
A streak stands for a great many meteors: the count follows the real rate, it does not equal it.
strength (0 to 1, the page's meteors-strength) then scales the count: half the streaks at 0.5, none at 0.
インポート
import { streaksPerSecond } from "@johnmorrisdotca/chikyu-earth/meteors";
定義
function streaksPerSecond(meanHourlyRate: number, strength?: number): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
meanHourlyRate | number | The mean over the view of each place's hourly rate times how dark it is there ( |
strength (省略可) | number | How strongly the streaks are drawn, from 0 to 1 (1 when left out); a number outside the range is brought to its nearest end. |
戻り値
number
Streaks a second.
例
import { streaksPerSecond } from "@johnmorrisdotca/chikyu-earth/meteors";
console.log(streaksPerSecond(8), streaksPerSecond(0), streaksPerSecond(100000), streaksPerSecond(8, 0.5)); // 2.5 0 9 1.252.5 0 9 1.25出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。