Python cmath.polar() နည်းလမ်း
ဥပမာ
ရှုပ်ထွေးသောနံပါတ်တစ်ခုကို ပိုလာသြဒိနိတ်ပုံစံသို့ ပြောင်းပါ-
#import cmath for complex number operations
import cmath
#find
the polar coordinates of complex number
print (cmath.polar(2 + 3j))
print (cmath.polar(1 + 5j))
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
နည်းလမ်း သည် cmath.polar()
ရှုပ်ထွေးသော နံပါတ်တစ်ခုကို ဝင်ရိုးစွန်း သြဒိနိတ်များအဖြစ်သို့ ပြောင်းပေးသည်။ ၎င်းသည် modulus နှင့် phase ၏ tuple ကို ပြန်ပေးသည်။
ဝင်ရိုး စွန်းသြဒီနိတ်များတွင်၊ ရှုပ်ထွေးသောနံပါတ်ကို modulus r နှင့် phase angle phi တို့ဖြင့် သတ်မှတ်သည် ။
အထားအသို
cmath.polar(x)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
x | Required. A number to find polar coordinates of |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | tuple ပိုလာသြဒိနိတ်များကို ကိုယ်စားပြုသော တန်ဖိုး တစ်ခု |
---|---|
Python ဗားရှင်း- | ၂.၆ |