/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{maxHighlightReasons as t}from"../../../definitions.js";import{Float as n,float as r,vec3 as u,mod as c,floor as i,equal as o,vec4 as e,dot as f,vec2 as s,fract as l,sin as a,greaterThan as m,max as p,Vec4 as b,divide as d}from"../../graph/glsl.js";import{nanMagicNumber as y}from"./constants.js";function w(t){const n=r(12.9898),u=r(78.233),i=r(43758.5453),o=f(t,s(n,u)),e=c(o,r(3.14));return l(a(e).multiply(i))}function x(t){return o(t,r(y))}function j(t){return d(t,r(255))}function z(t,n){return t.x.multiply(n.y).subtract(n.x.multiply(t.y))}function g(t){return t.multiply(2).subtract(1)}function v(t){return t.multiply(.5).add(.5)}function h(t,n){const u=r(2**n);return c(i(t.divide(u)),r(2))}function k(t,n){return m(h(t,n),r(.5))}function q(n,r){return h(n,r+t)}function A(t,n){return h(t,n)}function B(t){const n=h(t.z,7),c=r(1).subtract(n),i=t.xyz.subtract(u(0,0,r(128)));return c.multiply(t).add(n.multiply(i))}function C(t){const n=e(255/256,255/65536,255/16777216,255/4294967296);return f(t,n)}function D(t){return p(p(p(t.x,t.y),t.z),t.w)}function E(t){return new n(1).subtract(t)}function F(t){return t.subtract(new n(1))}function G(t){return new n(1).divide(t)}function H(t,r){return new n(t).subtract(r)}function I(t,r){return t.subtract(new n(r))}function J(t,n,r,u){let c=new b(0);const i=new b(0);return c=K(c,t,i),c=K(c,n,i),c=K(c,r,i),c=K(c,u,i),c}function K(t,n,r){const u=n.subtract(r),c=t.add(u);return r=c.subtract(t).subtract(u),c}export{v as clipToUv,z as cross2,h as getBit,k as getBitBool,q as getFilterBit,A as getHighlightBit,x as isNan,K as kahanSummation,D as max4,F as minusOne,I as minusScalar,j as norm,E as oneMinus,G as oneOver,w as rand,C as rgba2float,H as scalarMinus,J as sum4,B as unpackDisplayIdTexel,g as uvToClip};
