minDistance should be float