/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{clamp as t}from"./mathUtils.js";function o(o,n,r=0){const f=t(o,0,l);for(let t=0;t<4;t++)n[r+t]=Math.floor(256*i(f*e[t]))}function n(o,n,r=0){const f=t(o,0,a);for(let t=0;t<3;t++)n[r+t]=Math.floor(256*i(f*e[t]))}function r(t,o=0){let n=0;for(let r=0;r<4;r++)n+=t[o+r]*f[r];return n}const e=[1,256,65536,16777216],f=[1/256,1/65536,1/16777216,1/4294967296],l=r(new Uint8ClampedArray([255,255,255,255])),a=r(new Uint8ClampedArray([255,255,255,0]));function i(t){return t-Math.floor(t)}export{a as maxRgbFloat,l as maxRgbaFloat,n as packFloatRGB,o as packFloatRGBA,r as unpackFloatRGBA};
