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.

PackedFloat32Array

A packed array of 32-bit floating-point values.

Description

An array specifically designed to hold 32-bit floating-point values (float). Packs data tightly, so it saves memory for large array sizes.

If you need to pack 64-bit floats tightly, see PackedFloat64Array.

Note

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

Constructors

PackedFloat32Array

PackedFloat32Array()

PackedFloat32Array

PackedFloat32Array(from: PackedFloat32Array)

PackedFloat32Array

PackedFloat32Array(from: Array)

Methods

bool

append(value: float)

void

append_array(array: PackedFloat32Array)

int

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

void

clear()

int

count(value: float) const

PackedFloat32Array

duplicate()

void

fill(value: float)

int

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

bool

has(value: float) const

int

insert(at_index: int, value: float)

bool

is_empty() const

bool

push_back(value: float)

void

remove_at(index: int)

int

resize(new_size: int)

void

reverse()

int

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

void

set(index: int, value: float)

int

size() const

PackedFloat32Array

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

void

sort()

PackedByteArray

to_byte_array() const

Operators

bool

operator !=(right: PackedFloat32Array)

PackedFloat32Array

operator +(right: PackedFloat32Array)

bool

operator ==(right: PackedFloat32Array)

float

operator [](index: int)


Constructor Descriptions

PackedFloat32Array PackedFloat32Array()

Constructs an empty PackedFloat32Array.


PackedFloat32Array PackedFloat32Array(from: PackedFloat32Array)

Constructs a PackedFloat32Array as a copy of the given PackedFloat32Array.


PackedFloat32Array PackedFloat32Array(from: Array)

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