godot/tests/core
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
..
io Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
math Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
object Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
string Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
templates Array: Relax slice bound checks to properly handle negative indices 2022-01-10 22:42:03 +01:00
variant Array: Relax slice bound checks to properly handle negative indices 2022-01-10 22:42:03 +01:00
test_crypto.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
test_hashing_context.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
test_time.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00