/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{setAxisAngle as t,multiply as r}from"../../core/libs/gl-matrix-2/math/quat.js";import{create as o}from"../../core/libs/gl-matrix-2/factories/quatf64.js";import{create as a,fromValues as s}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{toDegree as m,toRadian as i}from"../../core/libs/gl-matrix-2/math/common.js";import{d as c,n,r as e}from"../../chunks/vec32.js";const f=a(),l=o(),u=o(),p=o(),h=s(0,0,1),j=s(0,1,0),x=s(1,0,0);function b(r){c(f,r),n(f,f);const a=Math.atan2(f[1],f[0]),s=t(o(),h,-a);e(f,f,s);const i=-1*Math.atan2(f[2],f[0]);return[m(a)+270,m(i)+90]}function g(o,a){return t(u,h,i(o-270)),t(p,j,i(a-90)),r(l,u,p),c(f,x),e(f,f,l),n(f,f),[f[0],f[1],f[2]]}export{g as computeNormalFromOrientationTilt,b as computeOrientationTiltFromNormal};
