Arithmetic.DividedBy

Extension Method in Arithmetic

Declaration

public static Color DividedBy(this Color color, Color other, bool divideAlpha = true)

Description

Returns the result of dividing the components of the color with another color. Clamps the values in the range [0..1].

Parameters

colorThe color being divided.
otherThe color to divide by.
divideAlphaTrue to divide the alpha components, otherwise it is left unmodified (default=true).

Returns

ColorThe new color with the divided components.

Overload

Declaration

public static Color DividedBy(this Color color, float divisor, bool divideAlpha = true)

Description

Returns the result of dividing the components of the color by a divisor. Clamps the values in the range [0..1].

Parameters

colorThe color being divided.
divisorThe amount to divide the color by.
divideAlphaTrue to divide the alpha component, otherwise it is left unmodified (default=true).

Returns

ColorThe new color with the divided components.