Function PreparedBrettel1997Dichromat.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. Distinct source and destination arrays are also supported.

Allocation

Does not allocate.

Complexity

O(N).

Example

const prepared =
    prepareBrettel1997Dichromat!double(
        CvdDeficiency.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].brettel1997Dichromat(
        CvdDeficiency.deutan
    )
);
assert(
    output[1] ==
    input[1].brettel1997Dichromat(
        CvdDeficiency.deutan
    )
);