/* This file contains proprietary software owned by Motorola Mobility, Inc.
No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
*/ /////////////////////////////////////////////////////////////////////// // Class Utils // Vector Utility functions /////////////////////////////////////////////////////////////////////// var VecUtils = exports.VecUtils = Object.create(Object.prototype, { /////////////////////////////////////////////////////////////////////// // Instance variables /////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// // Property accessors /////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// // Vector Methods /////////////////////////////////////////////////////////////////////// vecNormalize: { value: function(dimen, vec, lenToMake) { var rtnVec; try { var len = 1.0 var nArgs = arguments.length; if (nArgs > 2) len = lenToMake; var sum = 0.0; for (var i=0; i