* Computes the componentwise sum of two Colors. * * @param {Color} left The first Color. * @param {Color} right The second Color. * @param {Color} result The object onto which to store the result. * @returns {Color} The modified result parameter.
(left, right, result)
| 774 | * @returns {Color} The modified result parameter. |
| 775 | */ |
| 776 | static add(left, right, result) { |
| 777 | //>>includeStart('debug', pragmas.debug); |
| 778 | Check.typeOf.object("left", left); |
| 779 | Check.typeOf.object("right", right); |
| 780 | Check.typeOf.object("result", result); |
| 781 | //>>includeEnd('debug'); |
| 782 | |
| 783 | result.red = left.red + right.red; |
| 784 | result.green = left.green + right.green; |
| 785 | result.blue = left.blue + right.blue; |
| 786 | result.alpha = left.alpha + right.alpha; |
| 787 | return result; |
| 788 | } |
| 789 | |
| 790 | /** |
| 791 | * Computes the componentwise difference of two Colors. |
no test coverage detected