ee.Number.hypot

यह फ़ंक्शन, 2D वेक्टर [x, y] के मैग्नीट्यूड का हिसाब लगाता है.

इस्तेमालरिटर्न
Number.hypot(right)नंबर
आर्ग्यूमेंटटाइपविवरण
यह: leftनंबरबाईं ओर मौजूद वैल्यू.
rightनंबरदाईं ओर मौजूद वैल्यू.

उदाहरण

कोड एडिटर (JavaScript)

// Left input is x and right input is y, representing point (x,y).
print('Length from origin to point (0,0)', ee.Number(0).hypot(0));  // 0
print('Length from origin to point (3,0)', ee.Number(3).hypot(0));  // 3
print('Length from origin to point (3,4)', ee.Number(3).hypot(4));  // 5
print('Length from origin to point (-3,4)', ee.Number(-3).hypot(4));  // 5
print('Length from origin to point (-3,-4)', ee.Number(-3).hypot(-4));  // 5

Python सेटअप करना

Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap का इस्तेमाल करने के बारे में जानकारी पाने के लिए, Python एनवायरमेंट पेज देखें.

import ee
import geemap.core as geemap

Colab (Python)

# Left input is x and right input is y, representing point (x,y).
# 0
print('Length from origin to point (0,0):', ee.Number(0).hypot(0).getInfo())
# 3
print('Length from origin to point (3,0):', ee.Number(3).hypot(0).getInfo())
# 5
print('Length from origin to point (3,4):', ee.Number(3).hypot(4).getInfo())
# 5
print('Length from origin to point (-3,4):', ee.Number(-3).hypot(4).getInfo())
# 5
print('Length from origin to point (-3,-4):', ee.Number(-3).hypot(-4).getInfo())