Casts the input value to a 64-bit float.
Usage | Returns | Number.double() | Number |
Argument | Type | Details | this: input | Number | The input value. |
Examples
Code Editor (JavaScript)
// Declare an ee.Number.
var number = ee.Number(100);
print('ee.Number:', number);
// Cast a number to signed 64-bit floating point.
var doubleNumber = number.double();
print('ee.Number cast to double:', doubleNumber);
Python setup
See the
Python Environment page for information on the Python API and using
geemap
for interactive development.
import ee
import geemap.core as geemap
Colab (Python)
# Declare an ee.Number.
number = ee.Number(100)
print('ee.Number:', number.getInfo())
# Cast a number to signed 64-bit floating point.
double_number = number.double()
print('ee.Number cast to double:', double_number.getInfo())