var gdjs;(function(o){let s;(function(f){let i;(function(r){r.toNumber=function(t){return parseFloat(t)},r.toString=function(t){return""+t},r.logicalNegation=function(t){return!t},r.normalize=function(t,n,e){return n===e?e:(t-n)/(e-n)},r.clamp=function(t,n,e){return Math.min(Math.max(t,n),e)},r.acosh=function(t){return Math.log(t+Math.sqrt(t*t-1))},r.asinh=function(t){return Math.log(t+Math.sqrt(t*t+1))},r.atanh=function(t){return .5*Math.log((1+t)/(1-t))},r.cosh=function(t){return(Math.exp(t)+Math.exp(-t))/2},r.sinh=function(t){return(Math.exp(t)-Math.exp(-t))/2},r.tanh=function(t){return(Math.exp(t)-Math.exp(-t))/(Math.exp(t)+Math.exp(-t))},r.cot=function(t){return 1/Math.tan(t)},r.csc=function(t){return 1/Math.sin(t)},r.sec=function(t){return 1/Math.cos(t)},r.log10=function(t){return Math.log(t)/Math.LN10},r.log2=function(t){return Math.log(t)/Math.LN2},r.sign=function(t){return t===0?0:t>0?1:-1},r.cbrt=function(t){return Math.pow(t,1/3)},r.nthroot=function(t,n){return Math.pow(t,1/n)},r.mod=function(t,n){return t-n*Math.floor(t/n)},r.angleDifference=function(t,n){return o.evtTools.common.mod(o.evtTools.common.mod(t-n,360)+180,360)-180},r.angleBetweenPositions=function(t,n,e,u){return Math.atan2(u-n,e-t)*180/Math.PI},r.distanceBetweenPositions=function(t,n,e,u){return Math.sqrt((t-e)*(t-e)+(n-u)*(n-u))},r.lerp=function(t,n,e){return t+(n-t)*e},r.trunc=function(t){return t|0},r.getXFromAngleAndDistance=function(t,n){return n*Math.cos(o.toRad(t))},r.getYFromAngleAndDistance=function(t,n){return n*Math.sin(o.toRad(t))},r.roundTo=function(t,n){return!n||!Number.isInteger(n)?Math.round(t):Math.round(t*Math.pow(10,n))/Math.pow(10,n)},r.floorTo=function(t,n){return!n||!Number.isInteger(n)?Math.floor(t):Math.floor(t*Math.pow(10,n))/Math.pow(10,n)},r.ceilTo=function(t,n){return!n||!Number.isInteger(n)?Math.ceil(t):Math.ceil(t*Math.pow(10,n))/Math.pow(10,n)},r.pi=function(){return Math.PI},r.lerpAngle=function(t,n,e){return t+o.evtTools.common.angleDifference(n,t)*e},r.resolveAsyncEventsFunction=t=>{!!t&&!!t.task&&!!t.task.resolve&&t.task.resolve()}})(i=f.common||(f.common={}))})(s=o.evtTools||(o.evtTools={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=commontools.js.map
