Float32Array - stingray.Float32Array object reference - Stingray Lua API Reference

stingray.Float32Array object reference

Description

A data structure that represents an array of float.

More efficient structure for handling buffers in Lua.

Functions

Parameters

a :

any(stingray.Float32Array, number)

One addend

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.

b :

any(stingray.Float32Array, number)

The other addend

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.
Returns

stingray.Float32Array

The result

Parameters

a :

any(stingray.Float32Array, number)

One value

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.

b :

any(stingray.Float32Array, number)

The other value

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.
Returns

stingray.Float32Array

The result

Dividing with zero will give zero as the result, rather than an FPU exception.

Parameters

self :

stingray.Float32Array

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

i :

integer

The item to get.

Returns

number

The i'th element of the array.

Parameters

a :

any(stingray.Float32Array, number)

One value

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.

b :

any(stingray.Float32Array, number)

The other value

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.
Returns

stingray.Float32Array

The result

Parameters

self :

stingray.Float32Array

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

value :

number

The value to push.

Returns
This function does not return any values.
Parameters

self :

stingray.Float32Array

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

size :

integer

The new size.

Returns
This function does not return any values.
Parameters

self :

stingray.Float32Array

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

i :

integer

The item to get.

value :

number

The value to set.

Returns
This function does not return any values.
Parameters

self :

stingray.Float32Array

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

integer

The size of the array.

Parameters

self :

stingray.Float32Array

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

stingray.Float32Array

An array with the square root of all items.

Parameters

a :

stingray.Float32Array+

The arrays to interleave.

The + notation indicates that there may be one or more instances of the specified type.
Returns

stingray.Float32Array

An array with all the values interleaved.

All arrays must be of the same size.

Parameters

a :

any(stingray.Float32Array, number)

One value

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.

b :

any(stingray.Float32Array, number)

The other value

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.
Returns

stingray.Float32Array

The result

Parameters

a :

stingray.Float32Array

One array.

b :

stingray.Float32Array

Another array.

Returns
This function does not return any values.