astro.Function.classifyEccentricity - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / astro / classifyEccentricity
classifyEccentricity(
eccentricity):EccentricityClass
Defined in: src/astro/body-orbit.ts:131
Which of the four descriptive bands an eccentricity falls in.
number
An orbital eccentricity, as
Eccentricity carries it: 0 for a circle, rising
towards 1 for a long ellipse.
The band. See EccentricityClass for the thresholds.
If eccentricity is not a finite non-negative number. This takes a
bare number rather than a body, so there is no absent field for a bad one to be.
import { classifyEccentricity } from '@elite-dangerous-almanac/core/astro/body-orbit';
classifyEccentricity(0); // -> 'circular'
classifyEccentricity(0.0549); // -> 'nearly-circular'
classifyEccentricity(0.9); // -> 'highly-eccentric'