ee.Number.hypot

قدر بردار 2 بعدی [x, y] را محاسبه می کند.

استفاده برمی گرداند
Number. hypot (right) شماره
استدلال تایپ کنید جزئیات
این: left شماره مقدار سمت چپ.
right شماره مقدار سمت راست.

نمونه ها

ویرایشگر کد (جاوا اسکریپت)

// 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

راه اندازی پایتون

برای اطلاعات در مورد API پایتون و استفاده از geemap برای توسعه تعاملی به صفحه محیط پایتون مراجعه کنید.

import ee
import geemap.core as geemap

کولب (پایتون)

# 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())