ee.Number.acos

计算输入的反余弦(以弧度为单位)。

用法返回
Number.acos()数字
参数类型详细信息
此:input数字输入值。

示例

代码编辑器 (JavaScript)

// The domain of arccosine is [-1,1], inputs outside the domain are invalid.
print('Arccosine of -1', ee.Number(-1).acos());  // 3.141592653 (π)
print('Arccosine of 0', ee.Number(0).acos());  // 1.570796326 (π/2)
print('Arccosine of 1', ee.Number(1).acos());  // 0

Python 设置

如需了解 Python API 和如何使用 geemap 进行交互式开发,请参阅 Python 环境页面。

import ee
import geemap.core as geemap

Colab (Python)

# The domain of arccosine is [-1,1], inputs outside the domain are invalid.
print('Arccosine of -1:', ee.Number(-1).acos().getInfo())  # 3.141592653 (π)
print('Arccosine of 0:', ee.Number(0).acos().getInfo())  # 1.570796326 (π/2)
print('Arccosine of 1:', ee.Number(1).acos().getInfo())  # 0