星空网 > 软件开发 > 操作系统

andriod Java中度转度分秒

public String trandu2m(double d) { //gisoracle 编号
try {
//double dd = Convert.ToDouble(str);

String str = "" + d;

int p = str.indexOf(".");
int dt = Integer.parseInt(str.substring(0, p));
d = d - dt;
double M = d * 60;
int mt = (int) M;
M = (M - mt) * 60;
if (Math.abs(M - 60) < 0.001) {
M = 0;
mt = mt + 1;

}
if (mt == 60) {
dt = dt + 1;
mt = 0;
}


return ""+dt+"°"+mt+"′"+M+"″";
} catch(Exception e) {
return e.getMessage();
}

}



原标题:andriod Java中度转度分秒

关键词:JAVA

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

targetTap:https://www.goluckyvip.com/tag/25928.html
Target开店:https://www.goluckyvip.com/tag/25929.html
targus:https://www.goluckyvip.com/tag/25930.html
Tasala:https://www.goluckyvip.com/tag/25931.html
Taste Guru:https://www.goluckyvip.com/tag/25932.html
Tata CLiQ:https://www.goluckyvip.com/tag/25933.html
皇家游轮航线 皇家邮轮旅游攻略:https://www.vstour.cn/a/408245.html
2017春节旅游攻略有吗:https://www.vstour.cn/a/408246.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流