function e(e,t){n(e)&&(e=`100%`);var i=r(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),i&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(e=t===360?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t)),e)}function t(e){return Math.min(1,Math.max(0,e))}function n(e){return typeof e==`string`&&e.indexOf(`.`)!==-1&&parseFloat(e)===1}function r(e){return typeof e==`string`&&e.indexOf(`%`)!==-1}function i(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function a(e){return e<=1?`${Number(e)*100}%`:e}function o(e){return e.length===1?`0`+e:String(e)}export{e as bound01,i as boundAlpha,t as clamp01,a as convertToPercentage,n as isOnePointZero,r as isPercentage,o as pad2};