From e9a58551606b9a911bebe2f73904e6ac5ada590d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lozier?= Date: Wed, 5 Jul 2017 09:09:09 -0400 Subject: [PATCH] Fix typos --- Source/Core/Ellipsoid.js | 12 ++++++------ Source/Core/Math.js | 4 ++-- Source/Core/Rectangle.js | 2 +- Source/Widgets/Geocoder/GeocoderViewModel.js | 2 +- Specs/Core/EllipsoidSpec.js | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Source/Core/Ellipsoid.js b/Source/Core/Ellipsoid.js index dc421686d47..99460ef2060 100644 --- a/Source/Core/Ellipsoid.js +++ b/Source/Core/Ellipsoid.js @@ -58,7 +58,7 @@ define([ ellipsoid._centerToleranceSquared = CesiumMath.EPSILON1; if (ellipsoid._radiiSquared.z !== 0) { - ellipsoid._sqauredXOverSquaredZ = ellipsoid._radiiSquared.x / ellipsoid._radiiSquared.z; + ellipsoid._squaredXOverSquaredZ = ellipsoid._radiiSquared.x / ellipsoid._radiiSquared.z; } } @@ -91,7 +91,7 @@ define([ this._minimumRadius = undefined; this._maximumRadius = undefined; this._centerToleranceSquared = undefined; - this._sqauredXOverSquaredZ = undefined; + this._squaredXOverSquaredZ = undefined; initialize(this, x, y, z); } @@ -610,9 +610,9 @@ define([ * In earth case, with common earth datums, there is no need for this buffer since the intersection point is always (relatively) very close to the center. * In WGS84 datum, intersection point is at max z = +-42841.31151331382 (0.673% of z-axis). * Intersection point could be outside the ellipsoid if the ratio of MajorAxis / AxisOfRotation is bigger than the square root of 2 - * @param {Cartesian} [result] The cartesian to which to copy the result, or undefined to create and + * @param {Cartesian3} [result] The cartesian to which to copy the result, or undefined to create and * return a new instance. - * @returns {Cartesian | undefined} the intersection point if it's inside the ellipsoid, undefined otherwise + * @returns {Cartesian3 | undefined} the intersection point if it's inside the ellipsoid, undefined otherwise * * @exception {DeveloperError} position is required. * @exception {DeveloperError} Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y). @@ -631,7 +631,7 @@ define([ buffer = defaultValue(buffer, 0.0); - var sqauredXOverSquaredZ = this._sqauredXOverSquaredZ; + var squaredXOverSquaredZ = this._squaredXOverSquaredZ; if (!defined(result)) { result = new Cartesian3(); @@ -639,7 +639,7 @@ define([ result.x = 0.0; result.y = 0.0; - result.z = position.z * (1 - sqauredXOverSquaredZ); + result.z = position.z * (1 - squaredXOverSquaredZ); if (Math.abs(result.z) >= this._radii.z - buffer) { return undefined; diff --git a/Source/Core/Math.js b/Source/Core/Math.js index ab4bc9505e7..3c90ed58b95 100644 --- a/Source/Core/Math.js +++ b/Source/Core/Math.js @@ -764,7 +764,7 @@ define([ }; /** - * Computes Math.acos(value), but first clamps value to the range [-1.0, 1.0] + * Computes Math.acos(value), but first clamps value to the range [-1.0, 1.0] * so that the function will never return NaN. * * @param {Number} value The value for which to compute acos. @@ -781,7 +781,7 @@ define([ }; /** - * Computes Math.asin(value), but first clamps value to the range [-1.0, 1.0] + * Computes Math.asin(value), but first clamps value to the range [-1.0, 1.0] * so that the function will never return NaN. * * @param {Number} value The value for which to compute asin. diff --git a/Source/Core/Rectangle.js b/Source/Core/Rectangle.js index 615921b2980..70d5dd5a48a 100644 --- a/Source/Core/Rectangle.js +++ b/Source/Core/Rectangle.js @@ -289,7 +289,7 @@ define([ /** * Creates the smallest possible Rectangle that encloses all positions in the provided array. * - * @param {Cartesian[]} cartesians The list of Cartesian instances. + * @param {Cartesian3[]} cartesians The list of Cartesian instances. * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid the cartesians are on. * @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created. * @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided. diff --git a/Source/Widgets/Geocoder/GeocoderViewModel.js b/Source/Widgets/Geocoder/GeocoderViewModel.js index 8dc02b5cdb0..4b584f4f179 100644 --- a/Source/Widgets/Geocoder/GeocoderViewModel.js +++ b/Source/Widgets/Geocoder/GeocoderViewModel.js @@ -154,7 +154,7 @@ define([ /** * True if the geocoder should query as the user types to autocomplete - * @type {Booelan} + * @type {Boolean} * @default true */ this.autoComplete = defaultValue(options.autocomplete, true); diff --git a/Specs/Core/EllipsoidSpec.js b/Specs/Core/EllipsoidSpec.js index fbddd9c5fef..25f39c0fa1d 100644 --- a/Specs/Core/EllipsoidSpec.js +++ b/Specs/Core/EllipsoidSpec.js @@ -535,11 +535,11 @@ defineSuite([ }); - it('ellipsoid is initialized with _sqauredXOverSquaredZ property', function() { + it('ellipsoid is initialized with _squaredXOverSquaredZ property', function() { var ellipsoid = new Ellipsoid(4 , 4 , 3); - var sqauredXOverSquaredZ = ellipsoid.radiiSquared.x / ellipsoid.radiiSquared.z; - expect(ellipsoid._sqauredXOverSquaredZ).toEqual(sqauredXOverSquaredZ); + var squaredXOverSquaredZ = ellipsoid.radiiSquared.x / ellipsoid.radiiSquared.z; + expect(ellipsoid._squaredXOverSquaredZ).toEqual(squaredXOverSquaredZ); }); createPackableSpecs(Ellipsoid, Ellipsoid.WGS84, [Ellipsoid.WGS84.radii.x, Ellipsoid.WGS84.radii.y, Ellipsoid.WGS84.radii.z]);