Python math.asin()เมธอด
ตัวอย่าง
คืนค่า arc sine ของตัวเลขต่างๆ:
# Import math Library
import math
# Return the arc sine
of numbers
print(math.asin(0.55))
print(math.asin(-0.55))
print(math.asin(0))
print(math.asin(1))
print(math.asin(-1))
ความหมายและการใช้งาน
math.asin()
เมธอดจะคืนค่าอาร์คไซน์ของตัวเลข
หมายเหตุ:พารามิเตอร์ที่ส่งผ่านmath.asin()
ต้องอยู่ระหว่าง -1 ถึง 1
เคล็ดลับ: math.asin(1)
จะคืนค่าของ PI/2 และmath.asin(-1)
จะคืนค่าของ -PI/2
ไวยากรณ์
math.asin(x)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
x | Required. A number in the range -1 to 1. If x is not a number, it returns a TypeError |
รายละเอียดทางเทคนิค
คืนมูลค่า: | ค่า ที่float แทนค่าอาร์คไซน์ของตัวเลข |
---|---|
เวอร์ชันหลาม: | 1.4 |