方法 | 描述 |
---|---|
double toRadians(double d) | 轉換參數的角度單位 |
舉例如下
class ToRadiansDemo { public static void main(String[] args) { double i; for (i = -180.0; i <= 180; i += 45.0) { System.out.println(Math.toRadians(i) / Math.PI); } } } /* 《程式語言教學誌》的範例程式 http://pydoing.blogspot.com/ 檔名:ToRadiansDemo.java 功能:示範物件導向的基本觀念 作者:張凱慶 時間:西元 2010 年 10 月 */
編譯後執行,結果如下

中英文術語對照 | |
---|---|
方法 | method |
參數 | parameter |
沒有留言:
張貼留言