Python math.atan2() နည်းလမ်း
ဥပမာ
Radian ဖြင့် y/x ၏ arc tangent ကို ပြန်ပေးပါ။
# Import math Library
import math
# Return the arc tangent of y/x
in radians
print(math.atan2(8, 5))
print(math.atan2(20, 10))
print(math.atan2(34, -7))
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
နည်းလမ်းသည် y/x ၏ math.atan2()
arc tangent ကို ရေဒီယံဖြင့် ပြန်ပေးသည်။ x နှင့် y သည် အမှတ် (x၊ y) ၏ သြဒီနိတ်ဖြစ်သည်။
ပြန်ပေးသည့်တန်ဖိုးသည် PI နှင့် -PI အကြားဖြစ်သည်။
အထားအသို
math.atan2(y, x)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
y | Required. Specifies a positive or negative number |
x | Required. Specifies a positive or negative number |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | float PI နှင့် -PI ကြားရှိ ရေဒီယံတွင် y/x ၏ arc tangent ကို ကိုယ်စားပြုသော တန်ဖိုး |
---|---|
Python ဗားရှင်း- | ၁.၄ |