Yosef Karo, Translation:Shulchan Aruch — Orach Chaim 398…
“ Paragraph 1 - If the city is either longer than it is wide or it is square but not oriented with the cardinal directions, because there are still four even corners, when measuring the two thousand amot of the city's techum, we live it as it is and measure two thousand amot in each of the four directions. ”
