array.double
import array
Everything here is re-exported by
array, soimport arrayis enough and the names are called asarray.*. Importingarray.doubleon its own works too and reaches the same definitions.
DoubleArray: a packed array of double-precision IEEE 754 floats, 8
bytes per element.
DOUBLE_MAX and DOUBLE_MIN are the largest and smallest finite values
the type can hold.
Constants
DOUBLE_MAX
array.DOUBLE_MAX: number
Maximum value that “should” exist in a list passed to DoubleArray.
DOUBLE_MIN
array.DOUBLE_MIN: number
Minimum value that “should” exist in a list passed to DoubleArray.
Classes
DoubleArray
class array.DoubleArray < Array
class DoubleArray represents an array of 64-bit IEEE-754 floating-point numbers (doubles) in the platform byte order.
- printable — has a
@to_string(), soechoandprint()show something useful - serializable — has a
@to_json(), so it can be handed straight tojson.encode() - valueable — has a
@to_value(), so it converts to a plain Zuri value
DoubleArray.reverse()
array.DoubleArray.reverse() -> DoubleArray
Returns a new array containing the elements in the original array in reverse order.
Returns DoubleArray
DoubleArray.clone()
array.DoubleArray.clone() -> DoubleArray
Returns a new DoubleArray containing all items from the current array. The new array is a shallow copy of the original array.
Returns DoubleArray
DoubleArray.slice()
array.DoubleArray.slice(start, end) -> DoubleArray
Returns a new DoubleArray over [start, end) of this array (both
default to the whole array; negative bounds count from the end).
Parameters
start(?number)end(?number)
Returns DoubleArray
2021, Richard Ore and Zuri contributors