Function tryPrepareMachado2009
Prepares a Machado 2009 protan/deutan transform for repeated use.
bool tryPrepareMachado2009(T)(
RedGreenCvdDeficiency deficiency,
T severity,
out PreparedMachado2009!T prepared
) pure nothrow @nogc @safe
if (is(T == float) || is(T == double));
Severity uses the Machado model's own [0, 1] scale. On success, prepared
receives the interpolated matrix and the function returns true.
Invalid severity, including NaN and infinity, returns false. Because the
destination is an out parameter, it is reset to
PreparedMachado2009!T on entry and therefore remains in the
documented invalid state after failure.