Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

PackedInt64Array

A packed array of 64-bit integers.

Description

An array specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes.

Note: This type stores signed 64-bit integers, which means it can take values in the interval [-2^63, 2^63 - 1], i.e. [-9223372036854775808, 9223372036854775807]. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see PackedInt32Array for a more memory-friendly alternative.

Note

There are notable differences when using this API with C#. See C# API differences to GDScript for more information.

Constructors

PackedInt64Array

PackedInt64Array()

PackedInt64Array

PackedInt64Array(from: PackedInt64Array)

PackedInt64Array

PackedInt64Array(from: Array)

Methods

bool

append(value: int)

void

append_array(array: PackedInt64Array)

int

bsearch(value: int, before: bool = true)

void

clear()

int

count(value: int) const

PackedInt64Array

duplicate()

void

fill(value: int)

int

find(value: int, from: int = 0) const

bool

has(value: int) const

int

insert(at_index: int, value: int)

bool

is_empty() const

bool

push_back(value: int)

void

remove_at(index: int)

int

resize(new_size: int)

void

reverse()

int

rfind(value: int, from: int = -1) const

void

set(index: int, value: int)

int

size() const

PackedInt64Array

slice(begin: int, end: int = 2147483647) const

void

sort()

PackedByteArray

to_byte_array() const

Operators

bool

operator !=(right: PackedInt64Array)

PackedInt64Array

operator +(right: PackedInt64Array)

bool

operator ==(right: PackedInt64Array)

int

operator [](index: int)


Constructor Descriptions

PackedInt64Array PackedInt64Array()

Constructs an empty PackedInt64Array.


PackedInt64Array PackedInt64Array(from: PackedInt64Array)

Constructs a PackedInt64Array as a copy of the given PackedInt64Array.


PackedInt64Array PackedInt64Array(from: Array)

Constructs a new PackedInt64Array. Optionally, you can pass in a generic Array that will be converted.


Method Descriptions

bool append(value: int)

Appends an element at the end of the array (alias of push_back).


void append_array(array: PackedInt64Array)

Appends a PackedInt64Array at the end of this array.


int bsearch(value: int, before: bool = true)

Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a