Function PreparedMachado2009.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
PreparedMachado2009!double prepared;
assert(tryPrepareMachado2009(
RedGreenCvdDeficiency .deutan,
0.5,
prepared
));
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] .machado2009(
RedGreenCvdDeficiency .deutan,
0.5
)
);
assert(
output[1] ==
input[1] .machado2009(
RedGreenCvdDeficiency .deutan,
0.5
)
);