Function PreparedBrettel1997Dichromat.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 when the input/output lengths do
not match. An empty pair is a successful empty operation. 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 =
prepareBrettel1997Dichromat!double(
CvdDeficiency .tritan
);
const LinearSRgbd[1] input = [
LinearSRgbd(0.2, 0.4, 0.7)
];
LinearSRgbd[1] output;
assert(prepared .tryTransformInto(input[], output[]));
assert(
output[0] ==
input[0] .brettel1997Dichromat(
CvdDeficiency .tritan
)
);
}