Python math.degrees()วิธี การ
ตัวอย่าง
แปลงมุมจากเรเดียนเป็นองศา:
# 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))
ความหมายและการใช้งาน
วิธี การmmath.degrees()
แปลงมุมจากเรเดียนเป็นองศา
เคล็ดลับ: PI (3.14..) เรเดียนเท่ากับ 180 องศา ซึ่งหมายความว่า 1 เรเดียนเท่ากับ 57.2957795 องศา
เคล็ดลับ:ดูเพิ่มเติมmath.radians()
ที่การแปลงค่าดีกรีเป็นเรเดียน
ไวยากรณ์
math.degrees(x)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
x | Required. A radian value to convert into degrees. If the parameter is not a number, it returns a TypeError |
รายละเอียดทางเทคนิค
คืนมูลค่า: | ค่าfloat แทนค่าในหน่วยองศา |
---|---|
เวอร์ชันหลาม: | 2.3 |