text: define(["exports","./when-54c2dc71","./Check-6c0211bc","./Math-fc8cecf5","./Cartesian3-e5933291","./Transforms-7e4f9763"],function(n,i,e,a,c,f){"use strict";function l(n,e){this.normal=c.Cartesian3.clone(n),this.distance=e}l.fromPointNormal=function(n,e,a){var r=-c.Cartesian3.dot(e,n);return i.defined(a)?(c.Cartesian3.clone(e,a.normal),a.distance=r,a):new l(e,r)};var t=new c.Cartesian3;l.fromCartesian4=function(n,e){var a=c.Cartesian3.fromCartesian4(n,t),r=n.w;return i.defined(e)?(c.Cartesian3.clone(a,e.normal),e.distance=r,e):new l(a,r)},l.getPointDistance=function(n,e){return c.Cartesian3.dot(n.normal,e)+n.distance};var s=new c.Cartesian3;l.projectPointOntoPlane=function(n,e,a){i.defined(a)||(a=new c.Cartesian3);var r=l.getPointDistance(n,e),t=c.Cartesian3.multiplyByScalar(n.normal,r,s);return c.Cartesian3.subtract(e,t,a)};var C=new f.Matrix4,d=new f.Cartesian4,m=new c.Cartesian3;l.transform=function(n,e,a){var r=n.normal,t=n.distance,i=f.Matrix4.inverseTranspose(e,C),s=f.Cartesian4.fromElements(r.x,r.y,r.z,t,d),s=f.Matrix4.multiplyByVector(i,s,s),o=c.Cartesian3.fromCartesian4(s,m);return s=f.Cartesian4.divideByScalar(s,c.Cartesian3.magnitude(o),s),l.fromCartesian4(s,a)},l.clone=function(n,e){return i.defined(e)?(c.Cartesian3.clone(n.normal,e.normal),e.distance=n.distance,e):new l(n.normal,n.distance)},l.equals=function(n,e){return n.distance===e.distance&&c.Cartesian3.equals(n.normal,e.normal)},l.ORIGIN_XY_PLANE=Object.freeze(new l(c.Cartesian3.UNIT_Z,0)),l.ORIGIN_YZ_PLANE=Object.freeze(new l(c.Cartesian3.UNIT_X,0)),l.ORIGIN_ZX_PLANE=Object.freeze(new l(c.Cartesian3.UNIT_Y,0)),n.Plane=l});
  