//>>built
define("dojox/gfx3d/vector",["dojo/_base/lang","dojo/_base/array","./_base"],function(k,h,c){c.vector={sum:function(){var a={x:0,y:0,z:0};h.forEach(arguments,function(b){a.x+=b.x;a.y+=b.y;a.z+=b.z});return a},center:function(){var a=arguments.length;if(0==a)return{x:0,y:0,z:0};var b=c.vector.sum(arguments);return{x:b.x/a,y:b.y/a,z:b.z/a}},substract:function(a,b){return{x:a.x-b.x,y:a.y-b.y,z:a.z-b.z}},_crossProduct:function(a,b,e,d,c,f){return{x:b*f-e*c,y:e*d-a*f,z:a*c-b*d}},crossProduct:function(a,
b,e,d,g,f){return 6==arguments.length&&h.every(arguments,function(a){return"number"==typeof a})?c.vector._crossProduct(a,b,e,d,g,f):c.vector._crossProduct(a.x,a.y,a.z,b.x,b.y,b.z)},_dotProduct:function(a,b,c,d,g,f){return a*d+b*g+c*f},dotProduct:function(a,b,e,d,g,f){return 6==arguments.length&&h.every(arguments,function(a){return"number"==typeof a})?c.vector._dotProduct(a,b,e,d,g,f):c.vector._dotProduct(a.x,a.y,a.z,b.x,b.y,b.z)},normalize:function(a,b,e){var d;a instanceof Array?(d=a[0],b=a[1],a=
a[2]):(d=a,a=e);e=c.vector.substract(b,d);d=c.vector.substract(a,d);return c.vector.crossProduct(e,d)}};return c.vector});