📄 calculation.java
字号:
package Tools;
import com.esri.mo2.cs.geom.Point;
public class Calculation{
public double calDiatance(Point point1, Point point2) {
double distance;
double x1, x2, y1, y2;
x1 = point1.getX();
y1 = point1.getY();
x2 = point2.getX();
y2 = point2.getY();
distance = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
distance = Math.sqrt(distance);
return distance;
}
public double calElev(Point point1, Point point2) {
double distance;
double x1, x2, y1, y2;
x1 = point1.getX();
y1 = point1.getY();
x2 = point2.getX();
y2 = point2.getY();
distance = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
distance = Math.sqrt(distance);
return distance;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -