array.float
import array
Everything here is re-exported by
array, soimport arrayis enough and the names are called asarray.*. Importingarray.floaton its own works too and reaches the same definitions.
FloatArray: a packed array of single-precision IEEE 754 floats, 4
bytes per element.
FLOAT_MAX and FLOAT_MIN are the largest and smallest finite values
the type can hold.
Constants
FLOAT_MAX
array.FLOAT_MAX: number
Maximum value that “should” exist in a list passed to FloatArray.
FLOAT_MIN
array.FLOAT_MIN: number
Minimum value that “should” exist in a list passed to FloatArray.
Classes
FloatArray
class array.FloatArray < Array
class FloatArray represents an array of 32-bit IEEE-754 floating-point numbers 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
FloatArray.reverse()
array.FloatArray.reverse() -> FloatArray
Returns a new array containing the elements in the original array in reverse order.
Returns FloatArray
FloatArray.clone()
array.FloatArray.clone() -> FloatArray
Returns a new FloatArray containing all items from the current array. The new array is a shallow copy of the original array.
Returns FloatArray
FloatArray.slice()
array.FloatArray.slice(start, end) -> FloatArray
Returns a new FloatArray over [start, end) of this array (both default
to the whole array; negative bounds count from the end).
Parameters
start(?number)end(?number)
Returns FloatArray
2021, Richard Ore and Zuri contributors