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