|
101 | 101 | <Float32Array>[ 0.0, 0.0, 0.0, 0.0 ] |
102 | 102 |
|
103 | 103 |
|
| 104 | +{{alias}}.from( src[, map[, thisArg]] ) |
| 105 | + Creates a new typed array from an array-like object or an iterable. |
| 106 | + |
| 107 | + A callback is provided the following arguments: |
| 108 | + |
| 109 | + - value: source value. |
| 110 | + - index: source index. |
| 111 | + |
| 112 | + Parameters |
| 113 | + ---------- |
| 114 | + src: ArrayLike|Iterable |
| 115 | + Source of array elements. |
| 116 | + |
| 117 | + map: Function (optional) |
| 118 | + Callback to invoke for each source element. |
| 119 | + |
| 120 | + thisArg: Any (optional) |
| 121 | + Callback execution context. |
| 122 | + |
| 123 | + Returns |
| 124 | + ------- |
| 125 | + out: Float32Array |
| 126 | + A typed array. |
| 127 | + |
| 128 | + Examples |
| 129 | + -------- |
| 130 | + > function mapFcn( v ) { return v * 2.0; }; |
| 131 | + > var arr = {{alias}}.from( [ 1.0, -1.0 ], mapFcn ) |
| 132 | + <Float32Array>[ 2.0, -2.0 ] |
| 133 | + |
| 134 | + |
| 135 | +{{alias}}.of( element0[, element1[, ...[, elementN]]] ) |
| 136 | + Creates a new typed array from a variable number of arguments. |
| 137 | + |
| 138 | + Parameters |
| 139 | + ---------- |
| 140 | + element: number |
| 141 | + Array elements. |
| 142 | + |
| 143 | + Returns |
| 144 | + ------- |
| 145 | + out: Float32Array |
| 146 | + A typed array. |
| 147 | + |
| 148 | + Examples |
| 149 | + -------- |
| 150 | + > var arr = {{alias}}.of( 2.0, -2.0 ) |
| 151 | + <Float32Array>[ 2.0, -2.0 ] |
| 152 | + |
| 153 | + |
104 | 154 | {{alias}}.BYTES_PER_ELEMENT |
105 | 155 | Number of bytes per view element. |
106 | 156 |
|
|
151 | 201 | 0 |
152 | 202 |
|
153 | 203 |
|
| 204 | +{{alias}}.prototype.BYTES_PER_ELEMENT |
| 205 | + Number of bytes per view element. |
| 206 | + |
| 207 | + Examples |
| 208 | + -------- |
| 209 | + > var arr = new {{alias}}( 5 ); |
| 210 | + > arr.BYTES_PER_ELEMENT |
| 211 | + 4 |
| 212 | + |
| 213 | + |
154 | 214 | {{alias}}.prototype.length |
155 | 215 | Read-only property which returns the number of view elements. |
156 | 216 |
|
|
0 commit comments