A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Math/asin below:

Math.asin() - JavaScript | MDN

Math.asin()

Baseline Widely available

概述

Math.asin() 方法返回一个数值的反正弦(单位为弧度),即:

∀ x ∊ [ - 1 ; 1 ] , Math.asin ( x ) = arcsin ( x ) = the unique y ∊ [ - π 2 ; π 2 ] such that sin ( y ) = x \forall x \in [{-1};1],;\mathtt{\operatorname{Math.asin}(x)} = \arcsin(x) = \text{ the unique } ; y \in \left[-\frac{\pi}{2}; \frac{\pi}{2}\right] , \text{such that} ; \sin(y) = x 语法 参数 描述

asin 方法接受 -1 到 1 之间的数值作为参数,返回一个介于 - π 2 -\frac{\pi}{2} 到 π 2 \frac{\pi}{2} 弧度的数值。如果接受的参数值超出范围,则返回 NaN。

由于 asin 是 Math 的静态方法,所有应该像这样使用:Math.asin(),而不是作为你创建的 Math 实例的方法。

示例 示例:使用 Math.asin()
Math.asin(-2); // NaN
Math.asin(-1); // -1.5707963267948966 (-pi/2)
Math.asin(0); // 0
Math.asin(0.5); // 0.5235987755982989
Math.asin(1); // 1.5707963267948966 (pi/2)
Math.asin(2); // NaN

对于小于 -1 或大于 1 的参数值,Math.asin 返回 NaN。

规范 浏览器兼容性 参见

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4