From 0081b095e804b8d2246e0603055d38b3befcb359 Mon Sep 17 00:00:00 2001 From: hanbollar Date: Fri, 26 Jan 2018 11:21:36 -0500 Subject: [PATCH 01/16] added method to convert from cartographic to cartesian3 --- Source/Core/Cartesian3.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Source/Core/Cartesian3.js b/Source/Core/Cartesian3.js index 65f8c84bc5c0..78d0fc8b902a 100644 --- a/Source/Core/Cartesian3.js +++ b/Source/Core/Cartesian3.js @@ -1,5 +1,6 @@ define([ './Check', + './Core/Cartographic', './defaultValue', './defined', './DeveloperError', @@ -7,6 +8,7 @@ define([ './Math' ], function( Check, + Cartographic, defaultValue, defined, DeveloperError, @@ -778,6 +780,20 @@ define([ return result; }; + /** + * Returns a Cartesian3 position from a {@link Cartographic} input. + * + * @param {Cartographic} Cartographic input to be converted into a Cartesian3 output. + * @returns {Cartesian3} The position + */ + Cartesian3.fromCartographic = function(cartographicLocation, ellipsoid, result) { + //>>includeStart('debug', pragmas.debug); + Check.typeOf.number('cartographicLocation', Cartographic); + //>>includeEnd('debug'); + + return Cartesian3.fromRadians(cartographicLocation.longitude, cartographicLocation.latitude, cartographicLocation.height, ellipsoid, result); + }; + /** * Returns a Cartesian3 position from longitude and latitude values given in degrees. * From 3c4475d2c8525c1c1b30649f03de05a27e649a38 Mon Sep 17 00:00:00 2001 From: hanbollar Date: Fri, 26 Jan 2018 11:23:33 -0500 Subject: [PATCH 02/16] updated comments --- Source/Core/Cartesian3.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/Cartesian3.js b/Source/Core/Cartesian3.js index 78d0fc8b902a..8ac0ed467253 100644 --- a/Source/Core/Cartesian3.js +++ b/Source/Core/Cartesian3.js @@ -784,6 +784,8 @@ define([ * Returns a Cartesian3 position from a {@link Cartographic} input. * * @param {Cartographic} Cartographic input to be converted into a Cartesian3 output. + * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies. + * @param {Cartesian3} [result] The object onto which to store the result. * @returns {Cartesian3} The position */ Cartesian3.fromCartographic = function(cartographicLocation, ellipsoid, result) { From f5afecd3bb68858296fe8f2f59e5697cc6a7ec17 Mon Sep 17 00:00:00 2001 From: hanbollar Date: Fri, 26 Jan 2018 11:28:14 -0500 Subject: [PATCH 03/16] fixing error in including Cartographic into Cartesian3 file --- Source/Core/Cartesian3.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Cartesian3.js b/Source/Core/Cartesian3.js index 8ac0ed467253..3757ffa67e9f 100644 --- a/Source/Core/Cartesian3.js +++ b/Source/Core/Cartesian3.js @@ -1,6 +1,6 @@ define([ './Check', - './Core/Cartographic', + './Cartographic', './defaultValue', './defined', './DeveloperError', From c0df4c9783147fb41a6d249523642d4bb30f1fac Mon Sep 17 00:00:00 2001 From: hanbollar Date: Fri, 26 Jan 2018 11:30:44 -0500 Subject: [PATCH 04/16] updated changes.md --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index f2547b6a7d40..522d835ccf7f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -40,6 +40,7 @@ Change Log * Fixed sandcastle Particle System example for better visual [#6132](https://github.com/AnalyticalGraphicsInc/cesium/pull/6132) * Fixed camera movement and look functions for 2D mode [#5884](https://github.com/AnalyticalGraphicsInc/cesium/issues/5884) * Fixed discrepancy between default value used and commented value for default value for halfAxes of OrientedBoundingBox. [#6147](https://github.com/AnalyticalGraphicsInc/cesium/pull/6147) +* Added method in Cartesian3 to convert from Cartographic to Cartesian3 [#6163](https://github.com/AnalyticalGraphicsInc/cesium/pull/6163) ### 1.41 - 2018-01-02 From a212d56418018848128f9861d917829b96cc25c3 Mon Sep 17 00:00:00 2001 From: hanbollar Date: Fri, 26 Jan 2018 11:42:29 -0500 Subject: [PATCH 05/16] changes --- Source/Core/Cartesian3.js | 4 ++-- Specs/Core/Cartesian3Spec.js | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Source/Core/Cartesian3.js b/Source/Core/Cartesian3.js index 3757ffa67e9f..86b9085b16b7 100644 --- a/Source/Core/Cartesian3.js +++ b/Source/Core/Cartesian3.js @@ -1,14 +1,14 @@ define([ - './Check', './Cartographic', + './Check', './defaultValue', './defined', './DeveloperError', './freezeObject', './Math' ], function( - Check, Cartographic, + Check, defaultValue, defined, DeveloperError, diff --git a/Specs/Core/Cartesian3Spec.js b/Specs/Core/Cartesian3Spec.js index 65467fb60f36..b414224dea03 100644 --- a/Specs/Core/Cartesian3Spec.js +++ b/Specs/Core/Cartesian3Spec.js @@ -960,6 +960,16 @@ defineSuite([ }).toThrowDeveloperError(); }); + it('fromCartographic', function(){ + var lon = CesiumMath.toRadians(150); + var lat = CesiumMath.toRadians(-40); + var height = 100000; + var ellipsoid = Ellipsoid.WGS84; + var actual = Cartesian3.fromCartographic(new Cartographic(lon, lat, height)); + var expected = ellipsoid.cartographicToCartesian(new Cartographic(lon, lat, height)); + expect(actual).toEqual(expected); + }); + it('fromRadians', function(){ var lon = CesiumMath.toRadians(150); var lat = CesiumMath.toRadians(-40); From 12466f13d17cbdabebc4d9be99dadb3a1ce55abe Mon Sep 17 00:00:00 2001 From: hanbollar Date: Fri, 26 Jan 2018 12:03:50 -0500 Subject: [PATCH 06/16] moved method from cartesian3 to cartographic to get around issue of circular includes --- CHANGES.md | 2 +- Source/Core/Cartesian3.js | 18 ------------------ Source/Core/Cartographic.js | 16 ++++++++++++++++ Specs/Core/Cartesian3Spec.js | 10 ---------- Specs/Core/CartographicSpec.js | 10 ++++++++++ 5 files changed, 27 insertions(+), 29 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 522d835ccf7f..30c49a636574 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -40,7 +40,7 @@ Change Log * Fixed sandcastle Particle System example for better visual [#6132](https://github.com/AnalyticalGraphicsInc/cesium/pull/6132) * Fixed camera movement and look functions for 2D mode [#5884](https://github.com/AnalyticalGraphicsInc/cesium/issues/5884) * Fixed discrepancy between default value used and commented value for default value for halfAxes of OrientedBoundingBox. [#6147](https://github.com/AnalyticalGraphicsInc/cesium/pull/6147) -* Added method in Cartesian3 to convert from Cartographic to Cartesian3 [#6163](https://github.com/AnalyticalGraphicsInc/cesium/pull/6163) +* Added method in Cartographic to convert from Cartographic to Cartesian3 [#6163](https://github.com/AnalyticalGraphicsInc/cesium/pull/6163) ### 1.41 - 2018-01-02 diff --git a/Source/Core/Cartesian3.js b/Source/Core/Cartesian3.js index 86b9085b16b7..65f8c84bc5c0 100644 --- a/Source/Core/Cartesian3.js +++ b/Source/Core/Cartesian3.js @@ -1,5 +1,4 @@ define([ - './Cartographic', './Check', './defaultValue', './defined', @@ -7,7 +6,6 @@ define([ './freezeObject', './Math' ], function( - Cartographic, Check, defaultValue, defined, @@ -780,22 +778,6 @@ define([ return result; }; - /** - * Returns a Cartesian3 position from a {@link Cartographic} input. - * - * @param {Cartographic} Cartographic input to be converted into a Cartesian3 output. - * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies. - * @param {Cartesian3} [result] The object onto which to store the result. - * @returns {Cartesian3} The position - */ - Cartesian3.fromCartographic = function(cartographicLocation, ellipsoid, result) { - //>>includeStart('debug', pragmas.debug); - Check.typeOf.number('cartographicLocation', Cartographic); - //>>includeEnd('debug'); - - return Cartesian3.fromRadians(cartographicLocation.longitude, cartographicLocation.latitude, cartographicLocation.height, ellipsoid, result); - }; - /** * Returns a Cartesian3 position from longitude and latitude values given in degrees. * diff --git a/Source/Core/Cartographic.js b/Source/Core/Cartographic.js index a4ae56af58d7..898801bd713e 100644 --- a/Source/Core/Cartographic.js +++ b/Source/Core/Cartographic.js @@ -146,6 +146,22 @@ define([ return result; }; + /** + * Returns a Cartesian3 position from a {@link Cartographic} input. + * + * @param {Cartographic} Cartographic input to be converted into a Cartesian3 output. + * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies. + * @param {Cartesian3} [result] The object onto which to store the result. + * @returns {Cartesian3} The position + */ + Cartographic.toCartesian3 = function(cartographicLocation, ellipsoid, result) { + //>>includeStart('debug', pragmas.debug); + Check.typeOf.number('cartographicLocation', Cartographic); + //>>includeEnd('debug'); + + return Cartesian3.fromRadians(cartographicLocation.longitude, cartographicLocation.latitude, cartographicLocation.height, ellipsoid, result); + }; + /** * Duplicates a Cartographic instance. * diff --git a/Specs/Core/Cartesian3Spec.js b/Specs/Core/Cartesian3Spec.js index b414224dea03..65467fb60f36 100644 --- a/Specs/Core/Cartesian3Spec.js +++ b/Specs/Core/Cartesian3Spec.js @@ -960,16 +960,6 @@ defineSuite([ }).toThrowDeveloperError(); }); - it('fromCartographic', function(){ - var lon = CesiumMath.toRadians(150); - var lat = CesiumMath.toRadians(-40); - var height = 100000; - var ellipsoid = Ellipsoid.WGS84; - var actual = Cartesian3.fromCartographic(new Cartographic(lon, lat, height)); - var expected = ellipsoid.cartographicToCartesian(new Cartographic(lon, lat, height)); - expect(actual).toEqual(expected); - }); - it('fromRadians', function(){ var lon = CesiumMath.toRadians(150); var lat = CesiumMath.toRadians(-40); diff --git a/Specs/Core/CartographicSpec.js b/Specs/Core/CartographicSpec.js index d7d777d01b6c..428ab7528e63 100644 --- a/Specs/Core/CartographicSpec.js +++ b/Specs/Core/CartographicSpec.js @@ -27,6 +27,16 @@ defineSuite([ expect(c.height).toEqual(3); }); + it('toCartesian3', function(){ + var lon = CesiumMath.toRadians(150); + var lat = CesiumMath.toRadians(-40); + var height = 100000; + var ellipsoid = Ellipsoid.WGS84; + var actual = Cartographic.toCartesian3(new Cartographic(lon, lat, height)); + var expected = ellipsoid.cartographicToCartesian(new Cartographic(lon, lat, height)); + expect(actual).toEqual(expected); + }); + it('fromRadians works without a result parameter', function() { var c = Cartographic.fromRadians(Math.PI/2, Math.PI/4, 100.0); expect(c.longitude).toEqual(Math.PI/2); From 2d66d1e1a64d26e79340d37b0e9498bd3357f19b Mon Sep 17 00:00:00 2001 From: hanbollar Date: Fri, 26 Jan 2018 12:09:58 -0500 Subject: [PATCH 07/16] finished swap --- Source/Core/Cartographic.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Source/Core/Cartographic.js b/Source/Core/Cartographic.js index 898801bd713e..b317c9e33923 100644 --- a/Source/Core/Cartographic.js +++ b/Source/Core/Cartographic.js @@ -3,6 +3,7 @@ define([ './Check', './defaultValue', './defined', + './DeveloperError', './freezeObject', './Math', './scaleToGeodeticSurface' @@ -11,6 +12,7 @@ define([ Check, defaultValue, defined, + DeveloperError, freezeObject, CesiumMath, scaleToGeodeticSurface) { @@ -154,12 +156,14 @@ define([ * @param {Cartesian3} [result] The object onto which to store the result. * @returns {Cartesian3} The position */ - Cartographic.toCartesian3 = function(cartographicLocation, ellipsoid, result) { + Cartographic.toCartesian3 = function(cartographic, ellipsoid, result) { //>>includeStart('debug', pragmas.debug); - Check.typeOf.number('cartographicLocation', Cartographic); + if (!defined(cartographic)) { + throw new DeveloperError('cartographic is required.'); + } //>>includeEnd('debug'); - return Cartesian3.fromRadians(cartographicLocation.longitude, cartographicLocation.latitude, cartographicLocation.height, ellipsoid, result); + return Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height, ellipsoid, result); }; /** From 8eaf8c69c078246aba882a5176772bdf9d2724c5 Mon Sep 17 00:00:00 2001 From: hanbollar Date: Fri, 26 Jan 2018 13:13:32 -0500 Subject: [PATCH 08/16] lowercase c in comments and changed if defined check to one liner --- Source/Core/Cartographic.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Source/Core/Cartographic.js b/Source/Core/Cartographic.js index b317c9e33923..daec021cf443 100644 --- a/Source/Core/Cartographic.js +++ b/Source/Core/Cartographic.js @@ -3,7 +3,6 @@ define([ './Check', './defaultValue', './defined', - './DeveloperError', './freezeObject', './Math', './scaleToGeodeticSurface' @@ -12,7 +11,6 @@ define([ Check, defaultValue, defined, - DeveloperError, freezeObject, CesiumMath, scaleToGeodeticSurface) { @@ -151,16 +149,14 @@ define([ /** * Returns a Cartesian3 position from a {@link Cartographic} input. * - * @param {Cartographic} Cartographic input to be converted into a Cartesian3 output. + * @param {Cartographic} cartographic input to be converted into a Cartesian3 output. * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies. * @param {Cartesian3} [result] The object onto which to store the result. * @returns {Cartesian3} The position */ Cartographic.toCartesian3 = function(cartographic, ellipsoid, result) { //>>includeStart('debug', pragmas.debug); - if (!defined(cartographic)) { - throw new DeveloperError('cartographic is required.'); - } + Check.defined('cartographic', cartographic); //>>includeEnd('debug'); return Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height, ellipsoid, result); From f535a1763b0f6886ea921b2cf859f786d0d0968d Mon Sep 17 00:00:00 2001 From: hanbollar Date: Fri, 26 Jan 2018 13:18:50 -0500 Subject: [PATCH 09/16] formatted comment for legibility --- Source/Core/Cartographic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Cartographic.js b/Source/Core/Cartographic.js index daec021cf443..303fc0ec22fb 100644 --- a/Source/Core/Cartographic.js +++ b/Source/Core/Cartographic.js @@ -149,7 +149,7 @@ define([ /** * Returns a Cartesian3 position from a {@link Cartographic} input. * - * @param {Cartographic} cartographic input to be converted into a Cartesian3 output. + * @param {Cartographic} cartographic Input to be converted into a Cartesian3 output. * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies. * @param {Cartesian3} [result] The object onto which to store the result. * @returns {Cartesian3} The position From 035766a509b8965e7f9a5c8450eacd0092408da1 Mon Sep 17 00:00:00 2001 From: Hannah Bollar Date: Fri, 26 Jan 2018 14:13:07 -0500 Subject: [PATCH 10/16] clarified changed --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 30c49a636574..329501966693 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -40,7 +40,7 @@ Change Log * Fixed sandcastle Particle System example for better visual [#6132](https://github.com/AnalyticalGraphicsInc/cesium/pull/6132) * Fixed camera movement and look functions for 2D mode [#5884](https://github.com/AnalyticalGraphicsInc/cesium/issues/5884) * Fixed discrepancy between default value used and commented value for default value for halfAxes of OrientedBoundingBox. [#6147](https://github.com/AnalyticalGraphicsInc/cesium/pull/6147) -* Added method in Cartographic to convert from Cartographic to Cartesian3 [#6163](https://github.com/AnalyticalGraphicsInc/cesium/pull/6163) +* Added method Cartographic.toCartesian3 in Cartographic to convert from Cartographic to Cartesian3 [#6163](https://github.com/AnalyticalGraphicsInc/cesium/pull/6163) ### 1.41 - 2018-01-02 From 02fc93e00ef2928754cf64b8c7f19f1c6b6a019c Mon Sep 17 00:00:00 2001 From: Hannah Bollar Date: Fri, 26 Jan 2018 14:14:07 -0500 Subject: [PATCH 11/16] removed link --- Source/Core/Cartographic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Cartographic.js b/Source/Core/Cartographic.js index 303fc0ec22fb..502f4e2b0acf 100644 --- a/Source/Core/Cartographic.js +++ b/Source/Core/Cartographic.js @@ -147,7 +147,7 @@ define([ }; /** - * Returns a Cartesian3 position from a {@link Cartographic} input. + * Returns a Cartesian3 position from a Cartographic input. * * @param {Cartographic} cartographic Input to be converted into a Cartesian3 output. * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies. From c47d993a21a89b846858f119556cc2b6ebfffba6 Mon Sep 17 00:00:00 2001 From: Hannah Bollar Date: Fri, 26 Jan 2018 14:15:21 -0500 Subject: [PATCH 12/16] Update CartographicSpec.js --- Specs/Core/CartographicSpec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Specs/Core/CartographicSpec.js b/Specs/Core/CartographicSpec.js index 428ab7528e63..69c537fd1eed 100644 --- a/Specs/Core/CartographicSpec.js +++ b/Specs/Core/CartographicSpec.js @@ -27,7 +27,7 @@ defineSuite([ expect(c.height).toEqual(3); }); - it('toCartesian3', function(){ + it('toCartesian3 conversion from Cartographic input to Cartesian3 output', function(){ var lon = CesiumMath.toRadians(150); var lat = CesiumMath.toRadians(-40); var height = 100000; From 33831445208f5beca62dc37203d2f8e49dc02bf2 Mon Sep 17 00:00:00 2001 From: Gabby Getz Date: Fri, 26 Jan 2018 14:19:42 -0500 Subject: [PATCH 13/16] Cleanup CHANGES.md --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 329501966693..4e456b9a13dc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -40,7 +40,7 @@ Change Log * Fixed sandcastle Particle System example for better visual [#6132](https://github.com/AnalyticalGraphicsInc/cesium/pull/6132) * Fixed camera movement and look functions for 2D mode [#5884](https://github.com/AnalyticalGraphicsInc/cesium/issues/5884) * Fixed discrepancy between default value used and commented value for default value for halfAxes of OrientedBoundingBox. [#6147](https://github.com/AnalyticalGraphicsInc/cesium/pull/6147) -* Added method Cartographic.toCartesian3 in Cartographic to convert from Cartographic to Cartesian3 [#6163](https://github.com/AnalyticalGraphicsInc/cesium/pull/6163) +* Added `Cartographic.toCartesian3` to convert from Cartographic to Cartesian3. [#6163](https://github.com/AnalyticalGraphicsInc/cesium/pull/6163) ### 1.41 - 2018-01-02 From 57fad5ce6d592dba7dea199fbfddeb3ac809f2fa Mon Sep 17 00:00:00 2001 From: Hannah Bollar Date: Fri, 26 Jan 2018 14:27:18 -0500 Subject: [PATCH 14/16] Update CHANGES.md --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 4e456b9a13dc..42cc192c3c53 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -40,7 +40,7 @@ Change Log * Fixed sandcastle Particle System example for better visual [#6132](https://github.com/AnalyticalGraphicsInc/cesium/pull/6132) * Fixed camera movement and look functions for 2D mode [#5884](https://github.com/AnalyticalGraphicsInc/cesium/issues/5884) * Fixed discrepancy between default value used and commented value for default value for halfAxes of OrientedBoundingBox. [#6147](https://github.com/AnalyticalGraphicsInc/cesium/pull/6147) -* Added `Cartographic.toCartesian3` to convert from Cartographic to Cartesian3. [#6163](https://github.com/AnalyticalGraphicsInc/cesium/pull/6163) +* Added `Cartographic.toCartesian` to convert from Cartographic to Cartesian3. [#6163](https://github.com/AnalyticalGraphicsInc/cesium/pull/6163) ### 1.41 - 2018-01-02 From ef20e19f86978d7d76fa5bf7206bc7fe0fb91f48 Mon Sep 17 00:00:00 2001 From: Hannah Bollar Date: Fri, 26 Jan 2018 14:29:15 -0500 Subject: [PATCH 15/16] Update Cartographic.js --- Source/Core/Cartographic.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/Cartographic.js b/Source/Core/Cartographic.js index 502f4e2b0acf..f74e8d139c40 100644 --- a/Source/Core/Cartographic.js +++ b/Source/Core/Cartographic.js @@ -147,14 +147,15 @@ define([ }; /** - * Returns a Cartesian3 position from a Cartographic input. + * Creates a new Cartesian3 instance from a Cartographic input. The values in the inputted + * object should be in radians. * * @param {Cartographic} cartographic Input to be converted into a Cartesian3 output. * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies. * @param {Cartesian3} [result] The object onto which to store the result. * @returns {Cartesian3} The position */ - Cartographic.toCartesian3 = function(cartographic, ellipsoid, result) { + Cartographic.toCartesian = function(cartographic, ellipsoid, result) { //>>includeStart('debug', pragmas.debug); Check.defined('cartographic', cartographic); //>>includeEnd('debug'); From 1cb08f55dfce822afed04a99f762b4ba42fc0a39 Mon Sep 17 00:00:00 2001 From: Hannah Bollar Date: Fri, 26 Jan 2018 14:29:47 -0500 Subject: [PATCH 16/16] Update CartographicSpec.js --- Specs/Core/CartographicSpec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Specs/Core/CartographicSpec.js b/Specs/Core/CartographicSpec.js index 69c537fd1eed..d312e3fc9a57 100644 --- a/Specs/Core/CartographicSpec.js +++ b/Specs/Core/CartographicSpec.js @@ -27,12 +27,12 @@ defineSuite([ expect(c.height).toEqual(3); }); - it('toCartesian3 conversion from Cartographic input to Cartesian3 output', function(){ + it('toCartesian conversion from Cartographic input to Cartesian3 output', function(){ var lon = CesiumMath.toRadians(150); var lat = CesiumMath.toRadians(-40); var height = 100000; var ellipsoid = Ellipsoid.WGS84; - var actual = Cartographic.toCartesian3(new Cartographic(lon, lat, height)); + var actual = Cartographic.toCartesian(new Cartographic(lon, lat, height)); var expected = ellipsoid.cartographicToCartesian(new Cartographic(lon, lat, height)); expect(actual).toEqual(expected); });