Passed
Branch master (6eb04c)
by Rafael S.
01:12
created

externs/ieee754-buffer.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 14
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
eloc 2
c 1
b 0
f 0
nc 1
dl 0
loc 14
rs 10
wmc 2
mnd 0
bc 2
fnc 2
bpm 1
cpm 1
noi 9
1
/**
2
 * @fileoverview Externs for ieee754-buffer 0.0.1
3
 * @see https://github.com/rochars/ieee754-buffer
4
 * @externs
5
 */
6
7
/**
8
 * Pack a IEEE 754 floating point number.
9
 * Derived from typedarray.js by Linden Research, MIT License.
10
 * @see https://bitbucket.org/lindenlab/llsd/raw/7d2646cd3f9b4c806e73aebc4b32bd81e4047fdc/js/typedarray.js
11
 * @param {!Uint8Array|!Array<number>} buffer The buffer.
12
 * @param {number} index The index to write on the buffer.
13
 * @param {number} num The number.
14
 * @param {number} ebits The number of bits of the exponent.
15
 * @param {number} fbits The number of bits of the fraction.
16
 * @return {number} The next index to write on the buffer.
17
 */
18
function pack(buffer, index, num, ebits, fbits) {}
19
20
/**
21
 * Unpack a IEEE 754 floating point number.
22
 * Derived from IEEE754 by DeNA Co., Ltd., MIT License. 
23
 * Adapted to handle NaN. Should port the solution to the original repo.
24
 * @see https://github.com/kazuho/ieee754.js/blob/master/ieee754.js
25
 * @param {!Uint8Array|!Array<number>} buffer The buffer.
26
 * @param {number} index The index to read from the buffer.
27
 * @param {number} ebits The number of bits of the exponent.
28
 * @param {number} fbits The number of bits of the fraction.
29
 * @return {number} The floating point number.
30
 */
31
function unpack(buffer, index, ebits, fbits) {}
32