Exemple #1
0
 /// <summary>
 /// 转换为字符串,保留到小数点后n位
 /// </summary>
 /// <param name="n">保留到小数点后n位</param>
 /// <param name="mode">0表示返回度分秒,1表示返回ddffmm.mmm,其他返回表示弧度</param>
 /// <returns></returns>
 public string ToFormatString(int n, int mode = 0)
 {
     if (mode == 0)
     {
         return(B.ToFormatString(n) + "," + L.ToFormatString(n));
     }
     else
     if (mode == 1)
     {
         return(B.ChangeToDouble().ToFormatString(n) + "," + L.ChangeToDouble().ToFormatString(n));
     }
     else
     {
         return(Br.ToFormatString(n) + "," + Lr.ToFormatString(n));
     }
 }