Skip to content

Commit

Permalink
Merge pull request #12394 from CesiumGS/clipping-polygon-equality
Browse files Browse the repository at this point in the history
Fix for `ClippingPolygon` `equals` function
  • Loading branch information
ggetz authored Jan 8, 2025
2 parents 268232a + 4e6ba0b commit eed5ddb
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
##### Fixes :wrench:

- Fixed error when resetting `Cesium3DTileset.modelMatrix` to its initial value. [#12409](https://github.com/CesiumGS/cesium/pull/12409)
- Fixed the parameter types of the `ClippingPolygon.equals` function, and fixed cases where parameters to `equals` functions had erroneously not been marked as 'optional'. [#12394](https://github.com/CesiumGS/cesium/pull/12394)
- Fixed type of `ImageryLayer.fromProviderAsync`, to correctly show that the param `options` is optional. [#12400](https://github.com/CesiumGS/cesium/pull/12400)

### 1.125 - 2025-01-02
Expand Down
6 changes: 3 additions & 3 deletions packages/engine/Source/Core/Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,8 @@ Color.clone = function (color, result) {
/**
* Returns true if the first Color equals the second color.
*
* @param {Color} left The first Color to compare for equality.
* @param {Color} right The second Color to compare for equality.
* @param {Color} [left] The first Color to compare for equality.
* @param {Color} [right] The second Color to compare for equality.
* @returns {boolean} <code>true</code> if the Colors are equal; otherwise, <code>false</code>.
*/
Color.equals = function (left, right) {
Expand Down Expand Up @@ -577,7 +577,7 @@ Color.prototype.clone = function (result) {
/**
* Returns true if this Color equals other.
*
* @param {Color} other The Color to compare for equality.
* @param {Color} [other] The Color to compare for equality.
* @returns {boolean} <code>true</code> if the Colors are equal; otherwise, <code>false</code>.
*/
Color.prototype.equals = function (other) {
Expand Down
6 changes: 3 additions & 3 deletions packages/engine/Source/Core/Credit.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ Object.defineProperties(Credit.prototype, {
/**
* Returns true if the credits are equal
*
* @param {Credit} left The first credit
* @param {Credit} right The second credit
* @param {Credit} [left] The first credit
* @param {Credit} [right] The second credit
* @returns {boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
Credit.equals = function (left, right) {
Expand All @@ -132,7 +132,7 @@ Credit.equals = function (left, right) {
/**
* Returns true if the credits are equal
*
* @param {Credit} credit The credit to compare to.
* @param {Credit} [credit] The credit to compare to.
* @returns {boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
Credit.prototype.equals = function (credit) {
Expand Down
6 changes: 3 additions & 3 deletions packages/engine/Source/Core/DistanceDisplayCondition.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ DistanceDisplayCondition.unpack = function (array, startingIndex, result) {
/**
* Determines if two distance display conditions are equal.
*
* @param {DistanceDisplayCondition} left A distance display condition.
* @param {DistanceDisplayCondition} right Another distance display condition.
* @param {DistanceDisplayCondition} [left] A distance display condition.
* @param {DistanceDisplayCondition} [right] Another distance display condition.
* @return {boolean} Whether the two distance display conditions are equal.
*/
DistanceDisplayCondition.equals = function (left, right) {
Expand Down Expand Up @@ -163,7 +163,7 @@ DistanceDisplayCondition.prototype.clone = function (result) {
/**
* Determines if this distance display condition is equal to another.
*
* @param {DistanceDisplayCondition} other Another distance display condition.
* @param {DistanceDisplayCondition} [other] Another distance display condition.
* @return {boolean} Whether this distance display condition is equal to the other.
*/
DistanceDisplayCondition.prototype.equals = function (other) {
Expand Down
4 changes: 2 additions & 2 deletions packages/engine/Source/Core/OrientedBoundingBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1236,8 +1236,8 @@ OrientedBoundingBox.prototype.isOccluded = function (occluder) {
* Compares the provided OrientedBoundingBox componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {OrientedBoundingBox} left The first OrientedBoundingBox.
* @param {OrientedBoundingBox} right The second OrientedBoundingBox.
* @param {OrientedBoundingBox} [left] The first OrientedBoundingBox.
* @param {OrientedBoundingBox} [right] The second OrientedBoundingBox.
* @returns {boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
OrientedBoundingBox.equals = function (left, right) {
Expand Down
6 changes: 3 additions & 3 deletions packages/engine/Source/Core/Spherical.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ Spherical.normalize = function (spherical, result) {
/**
* Returns true if the first spherical is equal to the second spherical, false otherwise.
*
* @param {Spherical} left The first Spherical to be compared.
* @param {Spherical} right The second Spherical to be compared.
* @param {Spherical} [left] The first Spherical to be compared.
* @param {Spherical} [right] The second Spherical to be compared.
* @returns {boolean} true if the first spherical is equal to the second spherical, false otherwise.
*/
Spherical.equals = function (left, right) {
Expand Down Expand Up @@ -145,7 +145,7 @@ Spherical.equalsEpsilon = function (left, right, epsilon) {
/**
* Returns true if this spherical is equal to the provided spherical, false otherwise.
*
* @param {Spherical} other The Spherical to be compared.
* @param {Spherical} [other] The Spherical to be compared.
* @returns {boolean} true if this spherical is equal to the provided spherical, false otherwise.
*/
Spherical.prototype.equals = function (other) {
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/Source/DataSources/DataSourceClock.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ DataSourceClock.prototype.clone = function (result) {
/**
* Returns true if this DataSourceClock is equivalent to the other
*
* @param {DataSourceClock} other The other DataSourceClock to compare to.
* @param {DataSourceClock} [other] The other DataSourceClock to compare to.
* @returns {boolean} <code>true</code> if the DataSourceClocks are equal; otherwise, <code>false</code>.
*/
DataSourceClock.prototype.equals = function (other) {
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/Source/Scene/Billboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,7 @@ Billboard.getScreenSpaceBoundingBox = function (
* Determines if this billboard equals another billboard. Billboards are equal if all their properties
* are equal. Billboards in different collections can be equal.
*
* @param {Billboard} other The billboard to compare for equality.
* @param {Billboard} [other] The billboard to compare for equality.
* @returns {boolean} <code>true</code> if the billboards are equal; otherwise, <code>false</code>.
*/
Billboard.prototype.equals = function (other) {
Expand Down
4 changes: 2 additions & 2 deletions packages/engine/Source/Scene/ClippingPolygon.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ ClippingPolygon.clone = function (polygon, result) {
* Compares the provided ClippingPolygons and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Plane} left The first polygon.
* @param {Plane} right The second polygon.
* @param {ClippingPolygon} left The first polygon.
* @param {ClippingPolygon} right The second polygon.
* @returns {boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
ClippingPolygon.equals = function (left, right) {
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/Source/Scene/Label.js
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ Label.filterUnsupportedCharacters = function (text) {
* Determines if this label equals another label. Labels are equal if all their properties
* are equal. Labels in different collections can be equal.
*
* @param {Label} other The label to compare for equality.
* @param {Label} [other] The label to compare for equality.
* @returns {boolean} <code>true</code> if the labels are equal; otherwise, <code>false</code>.
*/
Label.prototype.equals = function (other) {
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/Source/Scene/PointPrimitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ PointPrimitive.getScreenSpaceBoundingBox = function (
* Determines if this point equals another point. Points are equal if all their properties
* are equal. Points in different collections can be equal.
*
* @param {PointPrimitive} other The point to compare for equality.
* @param {PointPrimitive} [other] The point to compare for equality.
* @returns {boolean} <code>true</code> if the points are equal; otherwise, <code>false</code>.
*/
PointPrimitive.prototype.equals = function (other) {
Expand Down

0 comments on commit eed5ddb

Please sign in to comment.