Float32Array

open external class Float32Array<B : ArrayBufferLike>(val buffer: B, val byteOffset: Int = definedExternally, val length: Int = definedExternally) : TypedArray<Float32Array<B>, Float32Array<ArrayBuffer>, B, Float> (source)

Constructors

Link copied to clipboard
constructor()
constructor(length: Int)
constructor(elements: JsIterable<Float>)
constructor(elements: ReadonlyArray<Float>)
constructor(buffer: B, byteOffset: Int = definedExternally, length: Int = definedExternally)

Types

Link copied to clipboard

Properties

Link copied to clipboard
open override val buffer: B
Link copied to clipboard
open override val byteLength: Int
Link copied to clipboard
open override val byteOffset: Int
Link copied to clipboard

The size in bytes of each element in the array.

Link copied to clipboard
open override val length: Int

Functions

Link copied to clipboard
fun <T> ArrayLike<T>.asList(): List<T>
Link copied to clipboard
fun at(index: Int): Float?

Returns the item located at the specified index.

Link copied to clipboard
fun copyWithin(target: Int, start: Int, end: Int = definedExternally): Float32Array<B>

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

Link copied to clipboard
open override fun entries(): JsIterator<JsTuple2<Int, Float>>
Link copied to clipboard
fun every(predicate: (value: Float) -> Unit): Boolean

Determines whether all the members of an array satisfy the specified test.

Link copied to clipboard
fun fill(value: Float, start: Int = definedExternally, end: Int = definedExternally): Float32Array<B>

Changes all array elements from start to end index to a static value and returns the modified array

Link copied to clipboard
fun filter(predicate: (value: Float) -> Boolean): Float32Array<ArrayBuffer>

Returns the elements of an array that meet the condition specified in a callback function.

Link copied to clipboard
fun find(predicate: (value: Float) -> Boolean): Float?

Returns the value of the first element in the array where predicate is true, and undefined otherwise.

Link copied to clipboard
fun findIndex(predicate: (value: Float) -> Boolean): Int

Returns the index of the first element in the array where predicate is true, and -1 otherwise.

Link copied to clipboard
fun findLast(predicate: (value: Float) -> Boolean): Float?

Returns the value of the last element in the array where predicate is true, and undefined otherwise.

Link copied to clipboard
fun findLastIndex(predicate: (value: Float) -> Boolean): Int

Returns the index of the last element in the array where predicate is true, and -1 otherwise.

Link copied to clipboard
open override fun forEach(action: (item: Float) -> Unit)

Performs the specified action for each element in an array.

Link copied to clipboard
open operator fun get(index: Int): Float
open operator fun get(key: Symbol.iterator): () -> JsIterator<Float>
Link copied to clipboard
fun includes(searchElement: Float, fromIndex: Int = definedExternally): Boolean

Determines whether an array includes a certain element, returning true or false as appropriate.

Link copied to clipboard
fun indexOf(searchElement: Float, fromIndex: Int = definedExternally): Int

Returns the index of the first occurrence of a value in an array.

Link copied to clipboard
open inline operator fun iterator(): Iterator<Float>
Link copied to clipboard
fun join(separator: String = definedExternally): String

Adds all the elements of an array separated by the specified separator string.

Link copied to clipboard
open override fun keys(): JsIterator<Int>
Link copied to clipboard
fun lastIndexOf(searchElement: Float, fromIndex: Int = definedExternally): Int

Returns the index of the last occurrence of a value in an array.

Link copied to clipboard
fun map(transform: (value: Float) -> Float): Float32Array<ArrayBuffer>

Calls a defined callback function on each element of an array, and returns an array that contains the results.

Link copied to clipboard

Reverses the elements in an Array.

Link copied to clipboard
open operator fun set(index: Int, value: Float)
fun set(array: Float32Array<B>, offset: Int = definedExternally)
fun set(array: ReadonlyArray<Float>, offset: Int = definedExternally)
Link copied to clipboard
fun slice(start: Int = definedExternally, end: Int = definedExternally): Float32Array<ArrayBuffer>

Returns a section of an array.

Link copied to clipboard
fun some(predicate: (value: Float) -> Boolean): Boolean

Determines whether the specified callback function returns true for any element of an array.

Link copied to clipboard
fun sort(comparison: (a: Float, b: Float) -> Int = definedExternally): Float32Array<B>

Sorts an array.

Link copied to clipboard
fun subarray(start: Int, end: Int): Float32Array<B>
Link copied to clipboard

Converts a number to a string by using the current locale.

Link copied to clipboard

Copies the array and returns the copy with the elements in reverse order.

Link copied to clipboard
fun toSorted(comparison: (a: Float, b: Float) -> Int = definedExternally): Float32Array<ArrayBuffer>

Copies and sorts the array.

Link copied to clipboard

Returns the primitive value of the specified object.

Link copied to clipboard
open override fun values(): JsIterator<Float>
Link copied to clipboard
fun with(index: Int, value: Float): Float32Array<ArrayBuffer>

Copies the array and inserts the given number at the provided index.