Python math.radians()メソッド
例
さまざまな度をラジアンに変換します。
# Import math Library
import math
# Convert different degrees
into radians
print(math.radians(180))
print(math.radians(100.03))
print(math.radians(-20))
定義と使用法
このmath.radians()
メソッドは、度の値をラジアンに変換します。
ヒント:math.degrees()
角度をラジアンから度に変換するも参照してください。
構文
math.radians(x)
パラメータ値
Parameter | Description |
---|---|
x | Required. The degree value to be converted into radians. If the parameter is not a number, it returns a TypeError |
技術的な詳細
戻り値: | 角度のfloat ラジアン値を表す値 |
---|---|
Pythonバージョン: | 2.0 |