SyntaxFix
Write A Post
Hire A Developer
Questions
This may be OLD, but here is the best answer:
float dist = (float) Math.sqrt( Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2) );