mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
12 lines
348 B
JavaScript
12 lines
348 B
JavaScript
/**
|
|
* Multiplies the backdrop and source color values.
|
|
* The result color is always at least as dark as either of the two constituent
|
|
* colors. Multiplying any color with black produces black;
|
|
* multiplying with white leaves the original color unchanged.
|
|
*/
|
|
var Multiply = function (a, b)
|
|
{
|
|
return (a * b) / 255;
|
|
};
|
|
|
|
module.exports = Multiply;
|