Last active
December 10, 2016 18:59
-
-
Save wen-dell/440744e01773e57839f6ad09f5110e59 to your computer and use it in GitHub Desktop.
Calcular distância entre dois pontos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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