Function PreparedVienot1999Dichromat.transformInto

Applies the prepared transform to fixed-cardinality caller-owned storage.

void transformInto(size_t N)(
  const ref LinearSRgb!T[N] input,
  ref LinearSRgb!T[N] output
) const pure nothrow @nogc @safe;

Exact in-place use is supported.

Allocation

Does not allocate.

Complexity

O(N).

Example

const prepared =
    prepareVienot1999Dichromat!double(
        RedGreenCvdDeficiency.deutan
    );

const LinearSRgbd[2] input = [
    LinearSRgbd(0.2, 0.4, 0.7),
    LinearSRgbd(0.7, 0.3, 0.1)
];
LinearSRgbd[2] output;

prepared.transformInto(input, output);

assert(
    output[0] ==
    input[0].vienot1999Dichromat(
        RedGreenCvdDeficiency.deutan
    )
);
assert(
    output[1] ==
    input[1].vienot1999Dichromat(
        RedGreenCvdDeficiency.deutan
    )
);