/** * Cesium - https://github.com/CesiumGS/cesium * * Copyright 2011-2020 Cesium Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Columbus View (Pat. Pend.) * * Portions licensed separately. * See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details. */ define(["exports","./when-8d13db60","./Check-70bec281","./Math-61ede240"],function(e,c,o,u){function i(e,t,n,r){this.x=c.defaultValue(e,0),this.y=c.defaultValue(t,0),this.z=c.defaultValue(n,0),this.w=c.defaultValue(r,0)}i.fromElements=function(e,t,n,r,a){return c.defined(a)?(a.x=e,a.y=t,a.z=n,a.w=r,a):new i(e,t,n,r)},i.fromColor=function(e,t){return o.Check.typeOf.object("color",e),c.defined(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new i(e.red,e.green,e.blue,e.alpha)},i.clone=function(e,t){if(c.defined(e))return c.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new i(e.x,e.y,e.z,e.w)},i.packedLength=4,i.pack=function(e,t,n){return o.Check.typeOf.object("value",e),o.Check.defined("array",t),n=c.defaultValue(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},i.unpack=function(e,t,n){return o.Check.defined("array",e),t=c.defaultValue(t,0),c.defined(n)||(n=new i),n.x=e[t++],n.y=e[t++],n.z=e[t++],n.w=e[t],n},i.packArray=function(e,t){o.Check.defined("array",e);var n=e.length,r=4*n;if(c.defined(t)){if(!Array.isArray(t)&&t.length!==r)throw new o.DeveloperError("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==r&&(t.length=r)}else t=new Array(r);for(var a=0;a