Added the IsSimilar and IsSimilarDistance functions.