Skip to content

Commit

Permalink
Merge master to dups
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcozzi committed Jan 9, 2015
2 parents 72bcefd + e778176 commit 6117aca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Change Log
* Added `PolygonGraphics.hierarchy` for supporting polygons with holes via data sources.
* `GeoJsonDataSource` now supports polygons with holes.
* `ConstantProperty` can now hold any value; previously it was limited to values that implemented `equals` and `clones` functions, as well as a few special cases.
* Fixed a bug in `EllipsoidGeodesic` that caused it to modify the `height` of the positions passed to the constructor or to to `setEndPoints`.
* Instead of throwing an exception when there are not enough unique positions to define a geometry, creating a `Primitive` will succeed, but not render. [#2375](https://github.com/AnalyticalGraphicsInc/cesium/issues/2375)

### 1.5 - 2015-01-05
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/EllipsoidGeodesic.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ define([
vincentyInverseFormula(ellipsoidGeodesic, ellipsoid.maximumRadius, ellipsoid.minimumRadius,
start.longitude, start.latitude, end.longitude, end.latitude);

start.height = 0;
end.height = 0;
ellipsoidGeodesic._start = Cartographic.clone(start, ellipsoidGeodesic._start);
ellipsoidGeodesic._end = Cartographic.clone(end, ellipsoidGeodesic._end);
ellipsoidGeodesic._start.height = 0;
ellipsoidGeodesic._end.height = 0;

setConstants(ellipsoidGeodesic);
}
Expand Down
8 changes: 8 additions & 0 deletions Specs/Core/EllipsoidGeodesicSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,12 @@ defineSuite([
expect(expectedMid.longitude).toEqualEpsilon(result.longitude, CesiumMath.EPSILON13);
expect(expectedMid.latitude).toEqualEpsilon(result.latitude, CesiumMath.EPSILON13);
});

it('doesn\'t modify incoming cartographics', function(){
var start = new Cartographic(1,2,3);
var end = new Cartographic(2,3,4);
var geodesic = new EllipsoidGeodesic(start, end);
expect(start.height).toEqual(3);
expect(end.height).toEqual(4);
});
});

0 comments on commit 6117aca

Please sign in to comment.