Color.opOpAssign

Overlolad of the *= and /= operators.

This operation computers the component-wise multiplicaton or division of a color and a scalar, then assignes it to the color. Components that exceed 255 are clamped to 255 and those below 0 are clamped to 0.

  1. Color opOpAssign(Color otherColor)
  2. Color opOpAssign(E num)
    struct Color
    ref
    opOpAssign
    (
    string op
    E
    )
    (
    E num
    )
    if (
    isNumeric!(E) &&
    (
    (op == "*") ||
    (op == "/")
    )
    )

Parameters

num
Type: E

the scalar to multiply/divide the Color

Return Value

Type: Color

A reference to this color after performing the multiplication or division.

Meta