Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Double ab = Math.abs(
- Math.sqrt(
- Math.pow((B.getX()-A.getX()), 2) +
- Math.pow((B.getY()-A.getY()), 2)
- )
- );
- Double bc = Math.abs(
- Math.sqrt(
- Math.pow((C.getX()-B.getX()), 2) +
- Math.pow((C.getY()-B.getY()), 2)
- )
- );
- Double ca = Math.abs(
- Math.sqrt(
- Math.pow((A.getX()-C.getX()), 2) +
- Math.pow((A.getY()-C.getY()), 2)
- )
- );
- return ab + bc + ca;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement