API Reference / aspect · function
Function: aspect()
function aspect(
body,
kind,
target,
orb?,
zodiac?): Predicate;
A Predicate that holds while body is within orb degrees of an
exact aspect to target. Feed it to when to find the time windows,
or compose it with allOf/anyOf.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
body | BodyId | undefined | The transiting body. |
kind | string | undefined | Aspect name, e.g. "conjunction", "square", "trine", "opposition", "sextile". |
target | number | BodyId | undefined | The aspect target: a fixed ecliptic longitude in degrees (e.g. a natal point) or another body id (a mutual aspect). |
orb | number | 1.0 | Half-width of the window in degrees. Defaults to 1.0. |
zodiac | Zodiac | "tropical" | Zodiac for the longitudes. Defaults to tropical. |
Returns
A predicate, true while within orb of the exact aspect.
Throws
Error if kind is not a known aspect.
Example
const natalSun = 79.3;
when(engine, aspect("saturn", "square", natalSun, 1), jd0, jd1); // Saturn squares