/* 2020-9-22 15:23:26 | 版权所有 军懋国兴  */
define(["exports","./when-cbf8cd21","./Check-35e1a91d","./Cartesian2-43e3a3be"],function(e,r,h,n){"use strict";function t(){this.high=n.Cartesian3.clone(n.Cartesian3.ZERO),this.low=n.Cartesian3.clone(n.Cartesian3.ZERO)}t.encode=function(e,n){var i;return h.Check.typeOf.number("value",e),r.defined(n)||(n={high:0,low:0}),0<=e?(i=65536*Math.floor(e/65536),n.high=i,n.low=e-i):(i=65536*Math.floor(-e/65536),n.high=-i,n.low=e+i),n};var o={high:0,low:0};t.fromCartesian=function(e,n){h.Check.typeOf.object("cartesian",e),r.defined(n)||(n=new t);var i=n.high,a=n.low;return t.encode(e.x,o),i.x=o.high,a.x=o.low,t.encode(e.y,o),i.y=o.high,a.y=o.low,t.encode(e.z,o),i.z=o.high,a.z=o.low,n};var c=new t;t.writeElements=function(e,n,i){h.Check.defined("cartesianArray",n),h.Check.typeOf.number("index",i),h.Check.typeOf.number.greaterThanOrEquals("index",i,0),t.fromCartesian(e,c);var a=c.high,r=c.low;n[i]=a.x,n[i+1]=a.y,n[i+2]=a.z,n[i+3]=r.x,n[i+4]=r.y,n[i+5]=r.z},e.EncodedCartesian3=t});