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 · What is near a star, an object or a point, in the sky and in space; neighbouring constellations

withinfunction

Everything within a radius of a target, nearest first: nearest with no count limit and within set to the radius.

Import it

import { within } from "@johnmorrisdotca/hoshi-stars/nearest";

Definition

function within(target: NearestTarget, radius: number, options: SkyOptions & { kind: "deep-sky"; among?: undefined; }): NearestList<NearestInSky<DeepSkyObject>>
function within<T extends NearestThing>(target: NearestTarget, radius: number, options: SkyOptions & { kind?: "star" | "deep-sky"; among: readonly T[]; }): NearestList<NearestInSky<T>>
function within(target: NearestTarget, radius: number, options?: SkyOptions & { kind?: "star"; among?: undefined; }): NearestList<NearestInSky>
function within<T extends NearestThing>(target: NearestTarget, radius: number, options: NearestOptions & { by: "space"; among: readonly T[]; }): NearestList<NearestInSpace<Extract<T, Star | NearbyStar>>>
function within(target: NearestTarget, radius: number, options: NearestOptions & { by: "space"; }): NearestList<NearestInSpace>
function within(target: NearestTarget, radius: number, options: NearestOptions): NearestList<NearestInSky<NearestThing> | NearestInSpace<Star | NearbyStar>>

Parameters

NameTypeDescription
targetNearestTarget

As for nearest.

radiusnumber

Degrees by angle, light-years by space (0 or more).

optionsNearestOptions

As for nearest; count limits the list if it is set.

Returns

NearestList<NearestInSky<NearestThing> | NearestInSpace<Star | NearbyStar>>

As for nearest.

Examples

import { within } from "@johnmorrisdotca/hoshi-stars/nearest";

console.log(within("Alcyone", 2, { magnitude: 5 }).length);
5

What it prints (run when this page was built)

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