Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 866 Bytes

next-transit.md

File metadata and controls

18 lines (11 loc) · 866 Bytes

//astronomy/io.github.cosinekitty.astronomy/nextTransit

nextTransit

fun nextTransit(body: Body, prevTransitTime: Time): TransitInfo

Searches for another transit of Mercury or Venus.

After calling searchTransit to find a transit of Mercury or Venus, this function finds the next transit after that. Keep calling this function as many times as you want to keep finding more transits.

See transitsAfter for convenient iteration of consecutive transits.

Parameters

body The planet whose transit is to be found. Must be Body.Mercury or Body.Venus.
prevTransitTime A date and time near the previous transit.