I think they calculate direct distance... But I am not sure, we should ask the experts.
Regarding your question, this is just for the sake of fun... I plan on taking my shorter original plan in J class some day, which consist of mostly enjoyable long haul Cathay Pacific flights.