Function Alpha.isValidAlpha

Reports whether alpha is a usable opacity from 0 through 1.

bool isValidAlpha() const pure nothrow @nogc @property @safe;

Returns false for values below 0, above 1, NaN, and infinities. The check does not clamp or otherwise modify the value.

Example

const value = Alpha!SRgbf(SRgbf(0.2f, 0.4f, 0.8f), 0.5f);
assert(value.isValidAlpha);
}