Python math.degrees() Methode
Beispiel
Konvertieren Sie Winkel von Bogenmaß in Grad:
# 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))
Definition und Verwendung
Die mmath.degrees()
Methode wandelt einen Winkel von Bogenmaß in Grad um.
Tipp: PI (3,14..) Bogenmaß entspricht 180 Grad, was bedeutet, dass 1 Bogenmaß gleich 57,2957795 Grad ist.
Tipp: Siehe auch math.radians()
Umrechnen eines Gradwertes in Bogenmaß.
Syntax
math.degrees(x)
Parameterwerte
Parameter | Description |
---|---|
x | Required. A radian value to convert into degrees. If the parameter is not a number, it returns a TypeError |
Technische Details
Rückgabewert: | Ein float Wert, der den Wert in Grad darstellt |
---|---|
Python-Version: | 2.3 |