/// <summary> /// 改变坐标轴指向 /// </summary> public void ChangeOrientation() { if (North == enum2DAxis.X) { North = enum2DAxis.Y; } else { North = enum2DAxis.X; } }
/// <summary> /// 交换xy的值 /// </summary> ///<param name="changeOrientation">是否改变坐标轴指向(默认不改变)</param> public void SwapXY(bool changeOrientation = false) { double temp = x; x = y; y = temp; if (changeOrientation) { if (North == enum2DAxis.X) { North = enum2DAxis.Y; } else { North = enum2DAxis.X; } } }
public Coor2(double x, double y, enum2DAxis north = enum2DAxis.X) { this.x = x; this.y = y; }