-4

How would I convert the equation for the distance between two points:

sqrt((x2 − x1)^2 + (y2 − y1)^2) 

into proper Java code?

Andy Prowl
  • 124,023
  • 23
  • 387
  • 451

1 Answers1

1

You can use Math.pow and Math.sqrt of package java.lang.Math

benzonico
  • 10,635
  • 5
  • 42
  • 50