Surya Siddhanta
शीघ्रे मन्दाधिके +अतीतः सम्योगो भवितान्यथा । द्वयोः प्राग्यायिनोर् एवम् वक्रिणोस् तु विपर्ययात्॥
When the longitude of the swift-moving planet is greater than that of the slow one, the conjunction (samyoga) is past; otherwise, it is to come : this is the case when the two are moving eastward; if, however, they are retrograding (vakrin), the contrary is true.
english translation
zIghre mandAdhike +atItaH samyogo bhavitAnyathA । dvayoH prAgyAyinor evam vakriNos tu viparyayAt॥
hk transliteration by Sanscript