You can use Math.pow
and Math.sqrt
of package java.lang.Math
how would I convert the sqrt(x2 − x1)^2 (y2 − y1)^2 to proper java code [closed]
-
16-03-2022 - |
题
How would I convert the equation for the distance between two points:
sqrt((x2 − x1)^2 + (y2 − y1)^2)
into proper Java code?
解决方案
不隶属于 StackOverflow