app/assets/javascripts/Core/EncodedCartesian3.js in cesium-0.24.1 vs app/assets/javascripts/Core/EncodedCartesian3.js in cesium-0.25.0

- old
+ new

@@ -59,16 +59,18 @@ * * @exception {DeveloperError} value is required. * * @example * var value = 1234567.1234567; - * var splitValue = EncodedCartesian3.encode(value); + * var splitValue = Cesium.EncodedCartesian3.encode(value); */ EncodedCartesian3.encode = function(value, result) { + //>>includeStart('debug', pragmas.debug); if (!defined(value)) { throw new DeveloperError('value is required'); } + //>>includeEnd('debug'); if (!defined(result)) { result = { high : 0.0, low : 0.0 @@ -107,17 +109,19 @@ * @returns {EncodedCartesian3} The modified result parameter or a new EncodedCartesian3 instance if one was not provided. * * @exception {DeveloperError} cartesian is required. * * @example - * var cart = new Cartesian3(-10000000.0, 0.0, 10000000.0); - * var encoded = EncodedCartesian3.fromCartesian(cart); + * var cart = new Cesium.Cartesian3(-10000000.0, 0.0, 10000000.0); + * var encoded = Cesium.EncodedCartesian3.fromCartesian(cart); */ EncodedCartesian3.fromCartesian = function(cartesian, result) { + //>>includeStart('debug', pragmas.debug); if (!defined(cartesian)) { throw new DeveloperError('cartesian is required'); } + //>>includeEnd('debug'); if (!defined(result)) { result = new EncodedCartesian3(); } @@ -156,31 +160,31 @@ * @exception {DeveloperError} cartesianArray is required. * @exception {DeveloperError} index must be a number greater than or equal to 0. * * @example * var positions = [ - * new Cartesian3(), + * new Cesium.Cartesian3(), * // ... * ]; * var encodedPositions = new Float32Array(2 * 3 * positions.length); * var j = 0; * for (var i = 0; i < positions.length; ++i) { - * EncodedCartesian3.writeElement(positions[i], encodedPositions, j); + * Cesium.EncodedCartesian3.writeElement(positions[i], encodedPositions, j); * j += 6; * } */ EncodedCartesian3.writeElements = function(cartesian, cartesianArray, index) { + //>>includeStart('debug', pragmas.debug); if (!defined(cartesian)) { throw new DeveloperError('cartesian is required'); } - if (!defined(cartesianArray)) { throw new DeveloperError('cartesianArray is required'); } - if (typeof index !== 'number' || index < 0) { throw new DeveloperError('index must be a number greater than or equal to 0.'); } + //>>includeEnd('debug'); EncodedCartesian3.fromCartesian(cartesian, encodedP); var high = encodedP.high; var low = encodedP.low;