tahamajs's picture
download
raw
450 Bytes
// @flow
import {clamp} from '../util/util';
/**
* Packs two numbers, interpreted as 8-bit unsigned integers, into a single
* float. Unpack them in the shader using the `unpack_float()` function,
* defined in _prelude.vertex.glsl
*
* @private
*/
export function packUint8ToFloat(a: number, b: number) {
// coerce a and b to 8-bit ints
a = clamp(Math.floor(a), 0, 255);
b = clamp(Math.floor(b), 0, 255);
return 256 * a + b;
}

Xet Storage Details

Size:
450 Bytes
·
Xet hash:
9514cb1fbfbc8107398b8d86bcbbfca14f25616254f8bb669d7db525c3c516f2

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.