Function multiplyInto
Multiplies corresponding left/right samples into destination.
bool multiplyInto(T)(
scope RasterView!T left,
size_t leftPlaneIndex,
scope RasterView!T right,
size_t rightPlaneIndex,
scope ref WritableRasterView!T destination,
size_t destinationPlaneIndex,
out RasterZipTransformError error
) nothrow @nogc @safe
if (isRasterArithmeticSample!T);
Supported T:
byte, ubyte, short, ushort, int, uint, long, ulong, float, double
Integer result:
mathematical product reduced modulo 2^N to T
Floating result:
D/IEEE-754 multiplication in T
Structural, alias, failure, allocation and execution semantics are inherited unchanged from zipTransformInto().
Example
Example reporting multiply failure through the shared zip-transform model.
import raster;
RasterView!float left;
RasterView!float right;
WritableRasterView!float destination;
RasterZipTransformError error;
assert(!multiplyInto(left, 0, right, 0, destination, 0, error));
assert(error == RasterZipTransformError .invalidLeftPlane);