Duplicate
Modified GetDistCpp1