* 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. * @returns {boolean} true if the Colors are equal; otherwise, false .
(left, right)
| 525 | * @returns {boolean} <code>true</code> if the Colors are equal; otherwise, <code>false</code>. |
| 526 | */ |
| 527 | static equals(left, right) { |
| 528 | return ( |
| 529 | left === right || // |
| 530 | (defined(left) && // |
| 531 | defined(right) && // |
| 532 | left.red === right.red && // |
| 533 | left.green === right.green && // |
| 534 | left.blue === right.blue && // |
| 535 | left.alpha === right.alpha) |
| 536 | ); |
| 537 | } |
| 538 | |
| 539 | /** |
| 540 | * @private |
no test coverage detected