Added Distance and Range Check Functions

checked
Added Distance and Range Check Functions