4.56 参考/Number toDegrees 方法

Number toDegrees 方法

toDegrees 方法用于将参数转化为角度。

语法

double toDegrees(double d)

参数

  • d -- 任何原生数据类型。

返回值

该方法返回 double 值。

实例

public class Test{
    public static void main(String args[]){
        double x = 45.0;
        double y = 30.0;

        System.out.println( Math.toDegrees(x) );
        System.out.println( Math.toDegrees(y) );
    }
}

编译以上程序,输出结果为:

2578.3100780887044
1718.8733853924698
全部评论

相关推荐

06-17 21:57
门头沟学院 Java
白友:噗嗤,我发现有些人事就爱发这些,明明已读不回就行了,就是要恶心人
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务