FunctionModulus, i.e. the remainder of a division of corresponding vector elements
Syntax C/C++#include <VFmath.h>
void VF_modV( fVector Z, fVector X, fVector Y, ui size );
void VFx_modV( fVector Z, fVector X, fVector Y, ui size, float A, float B );
C++ VecObj#include <OptiVec.h>
void vector<T>::modV( const vector<T>& X, const vector<T>& Y );
void vector<T>::x_modV( const vector<T>& X, const vector<T>& Y, const T& A, const T& B );
Pascal/Delphiuses VFmath;
procedure VF_modV( Z, X, Y:fVector; size:UIntSize );
procedure VFx_modV( Z, X, Y:fVector; size:UIntSize; A, B:Single );
Descriptionnormal versions: Zi = Xi mod Yi
expanded versions: Zi = (A * Xi + B) mod Yi
Floating-point versions: an argument Xi = 0.0 leads to Zi being 0.0, independently of Yi (as in the ANSI C math function fmod).
Integer versions: an argument Xi = 0 leads to a ZERODIVIDE error (as in the intrinsic "%" operation of ANSI C).
Error handlingnone
Return valuenone (also the floating-point versions are treated as basic arithmetic rather than mathematical functions, despite their relation to the math function fmod).
See alsoVF_modC,   VF_addV,   VF_mulV,   VF_divV,   VF_visV,   VF_redV

VectorLib Table of Contents  OptiVec home