You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I recently used Cartographic.fromCartesian method and got wrong results.
In order to see the problem please run the following code.
Currently it's logs 'false' to the console.
var cartographic1 = Cesium.Cartographic.fromDegrees(35.766989, 33.333602, 3000);
var cartesian1 = Cesium.Cartesian3.fromRadians(cartographic1.longitude, cartographic1.latitude, cartographic1.height);
var cartographic2 = Cesium.Cartographic.fromCartesian(cartesian1);
console.log(cartographic1.equalsEpsilon(cartographic2,Cesium.Math.EPSILON8)); //false
I have noticed that Ellipsoid.cartesianToCartographic produces an accurate result in this case.
It seems that Cartographic.fromCartesian is a copy of Ellipsoid.cartesianToCartographic (it was probably cloned because requirejs doesn't properly handle circular dependencies).
However there is a typo in the Cartographic.fromCartesian version.
Hi,
I recently used
Cartographic.fromCartesian
method and got wrong results.In order to see the problem please run the following code.
Currently it's logs 'false' to the console.
(Sandcastle)
I have noticed that
Ellipsoid.cartesianToCartographic
produces an accurate result in this case.It seems that
Cartographic.fromCartesian
is a copy ofEllipsoid.cartesianToCartographic
(it was probably cloned because requirejs doesn't properly handle circular dependencies).However there is a typo in the
Cartographic.fromCartesian
version.I fixed this typo and added two additional tests.
The text was updated successfully, but these errors were encountered: