godot/tests/core/variant
Rémi Verschelde c6cefb1b79
`Array`: Relax `slice` bound checks to properly handle negative indices
The same is done for `Vector` (and thus `Packed*Array`).

`begin` and `end` can now take any value and will be clamped to
`[-size(), size()]`. Negative values are a shorthand for indexing the array
from the last element upward.

`end` is given a default `INT_MAX` value (which will be clamped to `size()`)
so that the `end` parameter can be omitted to go from `begin` to the max size
of the array.

This makes `slice` works similarly to numpy's and JavaScript's.
2022-01-10 22:42:03 +01:00
..
test_array.h `Array`: Relax `slice` bound checks to properly handle negative indices 2022-01-10 22:42:03 +01:00
test_dictionary.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
test_variant.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00