Skip to content

Instantly share code, notes, and snippets.

@wen-dell
Last active December 10, 2016 18:59
Show Gist options
  • Save wen-dell/440744e01773e57839f6ad09f5110e59 to your computer and use it in GitHub Desktop.
Save wen-dell/440744e01773e57839f6ad09f5110e59 to your computer and use it in GitHub Desktop.
Calcular distância entre dois pontos
public class Ponto {
public static double distancia(double x1, double y1, double x2, double y2){
return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment