/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{ObjectStack as r}from"../../core/ObjectStack.js";import{b as c,i as n,j as t}from"../../chunks/vec32.js";import{copy as o,create as e,fromValues as u}from"./ray.js";function a(r){return r?{ray:e(r.ray),c0:r.c0,c1:r.c1}:{ray:e(),c0:0,c1:Number.MAX_VALUE}}function i(r,c,n){const t=A.get();return t.ray=r,t.c0=c,t.c1=n,t}function s(r,c=a()){return f(r.ray,r.c0,r.c1,c)}function f(r,c,n,t=a()){return o(r,t.ray),t.c0=c,t.c1=n,t}function y(r,c=a()){return o(r,c.ray),c.c0=0,c.c1=Number.MAX_VALUE,c}function m(r,n,t=a()){const o=c(r.vector);return u(r.origin,n,t.ray),t.c0=0,t.c1=o,t}function j(r,c){return b(r,r.c0,c)}function p(r,c){return b(r,r.c1,c)}function b(r,c,o){return n(o,r.ray.origin,t(o,r.ray.direction,c))}const A=new r(()=>a());export{s as copy,a as create,m as fromLineSegmentAndDirection,y as fromRay,f as fromValues,b as getAt,p as getEnd,j as getStart,i as wrap};
