Metoda Python math.degrees()
Příklad
Převeďte úhly z radiánů na stupně:
# 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))
Definice a použití
Metoda mmath.degrees()
převádí úhel z radiánů na stupně.
Tip: PI (3.14..) radiány jsou rovny 180 stupňům, což znamená, že 1 radián je roven 57.2957795 stupňům.
Tip: Viz také math.radians()
informace o převodu hodnoty stupně na radiány.
Syntax
math.degrees(x)
Hodnoty parametrů
Parameter | Description |
---|---|
x | Required. A radian value to convert into degrees. If the parameter is not a number, it returns a TypeError |
Technické údaje
Návratová hodnota: | Hodnota float představující hodnotu ve stupních |
---|---|
Verze Pythonu: | 2.3 |