Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/float16/index.d.ts>Float16ArrayConstructor

Stage 1 IEEE 754 half-precision floating-point for JavaScript
Go to Latest
interface Float16ArrayConstructor
import { type Float16ArrayConstructor } from "https://deno.land/x/float16@v3.7.0/index.d.ts";

Properties

readonly
prototype: Float16Array
readonly
BYTES_PER_ELEMENT: number

The size in bytes of each element in the array.

Methods

new(length: number): Float16Array
new(elements: Iterable<number>): Float16Array
new(array: ArrayLike<number> | ArrayBufferLike): Float16Array
new(
buffer: ArrayBufferLike,
byteOffset: number,
length?: number,
): Float16Array
of(...items: number[]): Float16Array

Returns a new array from a set of elements.

from(elements: Iterable<number>): Float16Array

Creates an array from an array-like or iterable object.

from<T>(
elements: Iterable<T>,
mapfn: (v: T, k: number) => number,
thisArg?: any,
): Float16Array

Creates an array from an array-like or iterable object.

from(arrayLike: ArrayLike<number>): Float16Array

Creates an array from an array-like or iterable object.

from<T>(
arrayLike: ArrayLike<T>,
mapfn: (v: T, k: number) => number,
thisArg?: any,
): Float16Array

Creates an array from an array-like or iterable object.