Latest web development tutorials

Python atan () Funktion

Python Zahlen Python Zahlen


Beschreibung

atan () gibt den Arcustangens von x in Radiant.


Grammatik

Im Folgenden ist die Syntax atan () -Methode:

import math

math.atan(x)

Hinweis: atan () nicht direkt zugänglich ist , müssen Sie Mathematikmodul zu importieren, und dann die Methode durch statische Objekte Mathematik nennen.


Parameter

  • x - ein Wert.

Rückgabewert

Liefert den Arkustangens von x in Radiant.


Beispiele

Nachfolgend ein Beispiel für die Verwendung von atan () Methode:

#!/usr/bin/python
import math

print "atan(0.64) : ",  math.atan(0.64)
print "atan(0) : ",  math.atan(0)
print "atan(10) : ",  math.atan(10)
print "atan(-1) : ",  math.atan(-1)
print "atan(1) : ",  math.atan(1)

Nach dem obigen Beispiel Ausgang läuft:

atan(0.64) :  0.569313191101
atan(0) :  0.0
atan(10) :  1.4711276743
atan(-1) :  -0.785398163397
atan(1) :  0.785398163397

Python Zahlen Python Zahlen