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 · The sky out to a distance, in layers: the stars and galaxies nearer than 10, 50, 100, 500 or 1,000 light-years, each distance band its own colour, the ones with an uncertain distance kept apart, and none placed at a guess

stepLimitfunction

The next limit up or down the steps (10, 50, 100, 500, 1,000, then all). From all a step down is 1,000; from 10 a step down stays at 10; a limit between two steps goes to the nearer step in that direction.

Import it

import { stepLimit } from "@johnmorrisdotca/hoshi-stars/distance";

Definition

function stepLimit(limit: number, direction: 1 | -1): number

Parameters

NameTypeDescription
limitnumber

The limit now, in light-years (Infinity for all).

direction1 | -1

1 for farther, -1 for nearer.

Returns

number

The new limit.

Examples

import { stepLimit } from "@johnmorrisdotca/hoshi-stars/distance";

console.log(stepLimit(10, 1), stepLimit(1000, 1), stepLimit(Infinity, -1), stepLimit(70, 1), stepLimit(70, -1));
50 Infinity 1000 100 50

What it prints (run when this page was built)

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