Skip to the content

Hoshi Stars星

The stars you can see without a telescope, with names, colours and distances; the 88 constellations with their lines and boundaries; the Messier objects; and seven map projections to draw them on.

Hoshi is the Japanese word 星 for a star. About the name

Contents

Reference · Names on the brightest stars and the constellation figures as faint lines, for a sky you draw yourself: a count or a magnitude, the figure under the pointer at full strength, a body that covers part of the sky, and a look set by settings alone

clampStrengthfunction

A strength held to 0 up to 1. A value that is not a number is the default.

Import it

import { clampStrength } from "@johnmorrisdotca/hoshi-stars/sky-labels";

Definition

function clampStrength(value: unknown, fallback?: number): number

Parameters

NameTypeDescription
valueunknown

Any number, or anything else.

fallback (optional)number

What to answer for a value that is not a number; DEFAULT_LINE_STRENGTH by default.

Returns

number

A number from 0 to 1.

Examples

import { clampStrength } from "@johnmorrisdotca/hoshi-stars/sky-labels";

console.log(clampStrength(3), clampStrength(-1), clampStrength(0.35), clampStrength("soft"));
1 0 0.35 0.16

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hoshi-stars 0.47.0.