ee.Number.atan2

Calcula el ángulo que forma el vector 2D [x, y].

UsoMuestra
Number.atan2(right)Número
ArgumentoTipoDetalles
esta: leftNúmeroEs el valor del lado izquierdo.
rightNúmeroEs el valor del lado derecho.

Ejemplos

Editor de código (JavaScript)

// Left input is x and right input is y, representing point (x,y).
print('Atan2 of point (0,0)', ee.Number(0).atan2(0));  // 0
print('Atan2 of point (1,0)', ee.Number(1).atan2(0));  // 0
print('Atan2 of point (0,1)', ee.Number(0).atan2(1));  // 1.570796326 (π/2)
print('Atan2 of point (-1,0)', ee.Number(-1).atan2(0));  // 3.141592653 (π)
print('Atan2 of point (0,-1)', ee.Number(0).atan2(-1));  // -1.570796326 (-π/2)

Configuración de Python

Consulta la página Entorno de Python para obtener información sobre la API de Python y el uso de geemap para el desarrollo interactivo.

import ee
import geemap.core as geemap

Colab (Python)

display('Atan2 of point (0,0):', ee.Number(0).atan2(0))  # 0
display('Atan2 of point (1,0):', ee.Number(1).atan2(0))  # 0
# 1.570796326 (π/2)
display('Atan2 of point (0,1):', ee.Number(0).atan2(1))
# 3.141592653 (π)
display('Atan2 of point (-1,0):', ee.Number(-1).atan2(0))
# -1.570796326 (-π/2)
display('Atan2 of point (0,-1):', ee.Number(0).atan2(-1))