Python - Methode math.radians()
Beispiel
Konvertieren Sie verschiedene Grade in Radiant:
# Import math Library
import math
# Convert different degrees
into radians
print(math.radians(180))
print(math.radians(100.03))
print(math.radians(-20))
Definition und Verwendung
Die math.radians()
Methode wandelt einen Gradwert in Bogenmaß um.
Tipp: Siehe auch math.degrees()
Winkel von Bogenmaß in Grad umwandeln.
Syntax
math.radians(x)
Parameterwerte
Parameter | Description |
---|---|
x | Required. The degree value to be converted into radians. If the parameter is not a number, it returns a TypeError |
Technische Details
Rückgabewert: | Ein float Wert, der das Bogenmaß eines Winkels darstellt |
---|---|
Python-Version: | 2.0 |