Skip to content

Instantly share code, notes, and snippets.

@Sk-OmarFaruque
Created September 21, 2017 07:24
Show Gist options
  • Save Sk-OmarFaruque/607db40cdd93bfd17e10da73e884d530 to your computer and use it in GitHub Desktop.
Save Sk-OmarFaruque/607db40cdd93bfd17e10da73e884d530 to your computer and use it in GitHub Desktop.
//radius calculation
switch(radius_unit)
{
case "Meters": { input_value = meters; break;}
case "KM": { input_value = meters/1000; break;}
case "Feet": { input_value = meters*3.28084; break;}
case "Miles": { input_value = meters*0.000621371; break;}
default :
{
alert("Invalid radius unit");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment