A typed array of 16-bit float values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised.
Index Signatures Jump to heading
Properties Jump to heading
Jump to headingBYTES_PER_ELEMENT: numberThe size in bytes of each element in the array.
Jump to headingbuffer: ArrayBufferLikeThe ArrayBuffer instance referenced by the array.
Jump to headingbyteLength: numberThe length in bytes of the array.
Jump to headingbyteOffset: numberThe offset in bytes of the array.
Jump to headinglength: numberThe length of the array.
Methods Jump to heading
Jump to headingcopyWithin(target: number,start: number,end?: number,): thisReturns the this object after copying a section of the array identified by start and end to the same array starting at position target
Jump to headingevery(predicate: () => unknown,thisArg?: any,): booleanDetermines whether all the members of an array satisfy the specified test.
Jump to headingfill(value: number,start?: number,end?: number,): thisChanges all array elements from start to end index to a static value and returns the modified array
Jump to headingfilter(predicate: () => any,thisArg?: any,): Float16ArrayReturns the elements of an array that meet the condition specified in a callback function.
Jump to headingfind(predicate: () => boolean,thisArg?: any,): number | undefinedReturns the value of the first element in the array where predicate is true, and undefined otherwise.
Jump to headingfindIndex(predicate: () => boolean,thisArg?: any,): numberReturns the index of the first element in the array where predicate is true, and -1 otherwise.
Jump to headingforEach(callbackfn: () => void,thisArg?: any,): voidPerforms the specified action for each element in an array.
Jump to headingindexOf(searchElement: number,fromIndex?: number,): numberReturns the index of the first occurrence of a value in an array.
Jump to headingjoin(separator?: string): stringAdds all the elements of an array separated by the specified separator string.
Jump to headinglastIndexOf(searchElement: number,fromIndex?: number,): numberReturns the index of the last occurrence of a value in an array.
Jump to headingmap(callbackfn: () => number,thisArg?: any,): Float16ArrayCalls a defined callback function on each element of an array, and returns an array that contains the results.
Jump to headingreduce(callbackfn: () => number): numberCalls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Jump to headingreduce(callbackfn: () => number,initialValue: number,): numberJump to headingreduce<U>(callbackfn: () => U,initialValue: U,): UCalls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Jump to headingreduceRight(callbackfn: () => number): numberCalls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Jump to headingreduceRight(callbackfn: () => number,initialValue: number,): numberJump to headingreduceRight<U>(callbackfn: () => U,initialValue: U,): UCalls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Reverses the elements in an Array.
Jump to headingset(array: ArrayLike<number>,offset?: number,): voidSets a value or an array of values.
Jump to headingslice(start?: number,end?: number,): Float16ArrayReturns a section of an array.
Jump to headingsome(predicate: () => unknown,thisArg?: any,): booleanDetermines whether the specified callback function returns true for any element of an array.
Jump to headingsort(compareFn?: (a: number,b: number,) => number): thisSorts an array.
Jump to headingsubarray(begin?: number,end?: number,): Float16ArrayGets a new Float16Array view of the ArrayBuffer store for this array, referencing the elements at begin, inclusive, up to end, exclusive.
Jump to headingtoLocaleString(): stringConverts a number to a string by using the current locale.
Jump to headingtoString(): stringReturns a string representation of an array.
Returns the primitive value of the specified object.
Methods Jump to heading
Jump to heading[[Symbol.iterator]](): IterableIterator<number>Jump to headingentries(): IterableIterator<[number, number]>Returns an array of key, value pairs for every entry in the array
Jump to headingkeys(): IterableIterator<number>Returns an list of keys in the array
Jump to headingvalues(): IterableIterator<number>Returns an list of values in the array
Properties Jump to heading
Jump to heading[[Symbol.toStringTag]]: "Float16Array"Methods Jump to heading
Jump to headingincludes(searchElement: number,fromIndex?: number,): booleanDetermines whether an array includes a certain element, returning true or false as appropriate.
Methods Jump to heading
Jump to headingat(index: number): number | undefinedReturns the item located at the specified index.
Methods Jump to heading
Jump to headingfindLast<S extends number>(predicate: () => value is S,thisArg?: any,): S | undefinedReturns the value of the last element in the array where predicate is true, and undefined otherwise.
Jump to headingfindLast(predicate: () => unknown,thisArg?: any,): number | undefinedJump to headingfindLastIndex(predicate: () => unknown,thisArg?: any,): numberReturns the index of the last element in the array where predicate is true, and -1 otherwise.
Copies the array and returns the copy with the elements in reverse order.
Jump to headingtoSorted(compareFn?: (a: number,b: number,) => number): Float16ArrayCopies and sorts the array.
Jump to headingwith(index: number,value: number,): Float16ArrayCopies the array and inserts the given number at the provided index.