/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{unitType as n,convertUnit as t,isBaseUnit as u,baseUnitForUnit as e}from"./units.js";function r(t,u){return{type:n(u),value:t,unit:u}}function i(n){return{value:n}}function a(t,u){return{type:n(u),value:t,unit:u}}function l(t,u){return{type:n(u),value:t,unit:u}}function o(t,u){return{type:n(u),value:t,unit:u}}function c(t,u,e="arithmetic"){return{type:n(u),value:t,unit:u,rotationType:e}}function f(n){return u(n.unit)}function s(n,t){const u=v(n,t);return"angle"===n.type?c(u,t,n.rotationType):r(u,t)}function v(n,u){return t(n.value,n.unit,u)}function p(n){return s(n,e(n.unit))}function y(n,u){return null==n?u:null==u||n.value>t(u.value,u.unit,n.unit)?n:u}function g(n,u){return null==n?u:null==u||n.value<t(u.value,u.unit,n.unit)?n:u}function m(n,t){return null==n?null:{...n,value:n.value*t}}function h(n,t,u){if(t===u)return n;switch(u){case"arithmetic":case"geographic":return 90-n}}const d=a(0,"meters"),T=l(0,"square-meters"),j=c(0,"radians"),q=c(0,"degrees"),w=c(0,"degrees","geographic");export{h as convertRotationType,c as createAngle,l as createArea,a as createLength,r as createQuantity,i as createScalar,o as createVolume,f as isBaseUnit,y as max,g as min,m as scale,p as toBaseUnit,s as toUnit,v as valueInUnit,q as zeroDegrees,w as zeroDegreesGeographic,d as zeroMeters,j as zeroRadians,T as zeroSquareMeters};
