Color.opBinary

Overlolad of the * and / operators.

This operator returns the component-wise multiplicaton or division of a color and a scalar. Components that exceed 255 are clamped to 255 and those below 0 are clamped to 0.

  1. Color opBinary(Color otherColor)
  2. Color opBinary(E num)
    struct Color
    opBinary
    const
    (
    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

The multiplication or division of this Color by the scalar.

Meta