index.d.ts   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 41
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 14
mnd 0
bc 0
fnc 2
dl 0
loc 41
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A IEEE754Buffer.unpack 0 10 1
A IEEE754Buffer.pack 0 12 1
1
// Type definitions for ieee754-buffer 1.0.0
2
// Project: https://github.com/rochars/ieee754-buffer
3
// Definitions by: Rafael da Silva Rocha <https://github.com/rochars>
4
// Definitions: https://github.com/rochars/ieee754-buffer
5
6
export = IEEE754Buffer;
7
8
declare module IEEE754Buffer {
9
10
  class IEEE754Buffer {
11
    /**
12
     * Pack a IEEE 754 floating point number.
13
     * @param {number} ebits The exponent bits.
14
     * @param {number} fbits The fraction bits.
15
     */
16
    constructor(ebits, fbits);
17
18
    /**
19
     * Pack a IEEE 754 floating point number.
20
     * @param {!Uint8Array|!Array<number>} buffer The buffer.
21
     * @param {number} num The number.
22
     * @param {number} index The index to write on the buffer.
23
     * @return {number} The next index to write on the buffer.
24
     */
25
    pack(
26
      buffer: Uint8Array|number[],
27
      num: number,
28
      index: number): number;
29
30
    /**
31
     * Unpack a IEEE 754 floating point number.
32
     * @param {!Uint8Array|!Array<number>} buffer The buffer.
33
     * @param {number} index The index to read from the buffer.
34
     * @return {number} The floating point number.
35
     */
36
    unpack(
37
      buffer: Uint8Array|number[],
38
      index: number): number;
39
  }
40
}
41