示例#1
0
文件: Coor2.cs 项目: mfkiwl/GeoFun
 /// <summary>
 /// 改变坐标轴指向
 /// </summary>
 public void ChangeOrientation()
 {
     if (North == enum2DAxis.X)
     {
         North = enum2DAxis.Y;
     }
     else
     {
         North = enum2DAxis.X;
     }
 }
示例#2
0
文件: Coor2.cs 项目: mfkiwl/GeoFun
        /// <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;
                }
            }
        }
示例#3
0
文件: Coor2.cs 项目: mfkiwl/GeoFun
 public Coor2(double x, double y, enum2DAxis north = enum2DAxis.X)
 {
     this.x = x;
     this.y = y;
 }