Function PreparedVienot1999Dichromat.tryTransformInto
Applies the prepared transform to runtime-sized caller-owned storage.
bool tryTransformInto(
const(LinearSRgb!T)[] input,
LinearSRgb!T[] output
) const pure nothrow @nogc @safe;
Returns false and performs no writes on a length mismatch. Exact
in-place use is supported.
Allocation
Does not allocate.
Complexity
O(N) on success and O(1) on a length mismatch.
Example
const prepared =
prepareVienot1999Dichromat!double(
RedGreenCvdDeficiency .protan
);
const LinearSRgbd[1] input = [
LinearSRgbd(0.2, 0.4, 0.7)
];
LinearSRgbd[1] output;
assert(prepared .tryTransformInto(input[], output[]));
assert(
output[0] ==
input[0] .vienot1999Dichromat(
RedGreenCvdDeficiency .protan
)
);
}