let APJS=require("../../../amazingpro"),BaseNode=require("../Utils/BaseNode").BaseNode;class CGEqualsExactly extends BaseNode{constructor(){super(),this.tolerance=.001}compareResult(e,t){let s=Math.sign(100*this.tolerance);return 0==s&&(s=1),(Math.abs(100*e-100*t)-Math.abs(100*this.tolerance))*s/100<=Number.EPSILON}getOutput(e){var t,s,a,i,r=this.inputs[0](),u=this.inputs[1]();return this.tolerance=this.inputs[2](),void 0!==r&&void 0!==u&&("Double"===this.valueType||"Int"===this.valueType?this.compareResult(r,u):"Vector2f"===this.valueType?(t=this.compareResult(r.x,u.x),s=this.compareResult(r.y,u.y),t&&s):"Vector3f"===this.valueType?(t=this.compareResult(r.x,u.x),s=this.compareResult(r.y,u.y),a=this.compareResult(r.z,u.z),t&&s&&a):"Vector4f"===this.valueType?(t=this.compareResult(r.x,u.x),s=this.compareResult(r.y,u.y),a=this.compareResult(r.z,u.z),i=this.compareResult(r.w,u.w),t&&s&&a&&i):"Color"===this.valueType?(t=this.compareResult(255*r.r,255*u.r),s=this.compareResult(255*r.g,255*u.g),a=this.compareResult(255*r.b,255*u.b),i=this.compareResult(100*r.a,100*u.a),t&&s&&a&&i):this.inputs[0]()===this.inputs[1]())}}exports.CGEqualsExactly=CGEqualsExactly;