Python math.degrees()メソッド
例
角度をラジアンから度に変換します。
# Import math Library
import math
# Convert from radians to
degrees:
print (math.degrees(8.90))
print (math.degrees(-20))
print
(math.degrees(1))
print (math.degrees(90))
定義と使用法
このmmath.degrees()
メソッドは、角度をラジアンから度に変換します。
ヒント: PI(3.14 ..)ラジアンは180度に等しく、これは1ラジアンが57.2957795度に等しいことを意味します。
ヒント:math.radians()
度の値をラジアンに変換するには、も参照してください。
構文
math.degrees(x)
パラメータ値
Parameter | Description |
---|---|
x | Required. A radian value to convert into degrees. If the parameter is not a number, it returns a TypeError |
技術的な詳細
戻り値: | float 値を度で表す値 |
---|---|
Pythonバージョン: | 2.3 |