UNPKG

989 BTypeScriptView Raw
1/**
2 * Returns a half precision floating point value from the given single precision floating point value.
3 * @param val A single precision floating point value.
4 * @see {@link https://threejs.org/docs/index.html#api/en/extras/DataUtils | Official Documentation}
5 * @see {@link https://github.com/mrdoob/three.js/blob/master/src/extras/DataUtils.js | Source}
6 */
7declare function toHalfFloat(val: number): number;
8
9/**
10 * Returns a single precision floating point value from the given half precision floating point value.
11 * @param val A half precision floating point value.
12 * @see {@link https://threejs.org/docs/index.html#api/en/extras/DataUtils | Official Documentation}
13 * @see {@link https://github.com/mrdoob/three.js/blob/master/src/extras/DataUtils.js | Source}
14 */
15declare function fromHalfFloat(val: number): number;
16
17declare const DataUtils: {
18 toHalfFloat: typeof toHalfFloat;
19 fromHalfFloat: typeof fromHalfFloat;
20};
21
22export { DataUtils, fromHalfFloat, toHalfFloat };