Estimatetype
A number with its uncertainty: the value, one standard error of it, and the range that error spans.
Import it
import type { Estimate } from "@johnmorrisdotca/hoshi-stars/profile";
Definition
interface Estimate {
value: number;
error: number;
range: readonly [
number,
number
];
}
Members
| Name | Type | Description |
|---|---|---|
value | number | The best figure. |
error | number | One standard error, in the unit of |
range | readonly [number, number] | The nearest and the farthest one standard error allows. The upper end is |
Examples
import { starByName } from "@johnmorrisdotca/hoshi-stars";
import { starProfile, type Estimate } from "@johnmorrisdotca/hoshi-stars/profile";
const radius: Estimate | undefined = starProfile(starByName("Vega")!).radius;
console.log(radius?.value, radius?.error, radius?.range);2.631445219165531 0.23998692144901068 [ 2.3747947988124243, 2.9162763377432355 ]What it prints (run when this page was built)