/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{asinClamped as t}from"../../core/mathUtils.js";import{b as o,h as s}from"../../chunks/vec32.js";function n(n,a){const c=o(n),h=t(n[2]/c),r=Math.atan2(n[1]/c,n[0]/c);return s(a,c,h,r),a}function a(t,o){const n=t[0],a=t[1],c=t[2],h=Math.cos(a);s(o,n*h*Math.cos(c),n*h*Math.sin(c),n*Math.sin(a))}export{n as cartesianToSpherical,a as sphericalToCartesian};
