p (OptiVec vector function)">p">
VF_sinrpiVD_sinrpiVE_sinrpi
VF_sinrpi2VD_sinrpi2VE_sinrpi2
VF_sinrpi3VD_sinrpi3VE_sinrpi3
FunctionSine function of fractional multiples of p
Syntax C/C++#include <VFmath.h>
int VF_sinrpi( fVector Y, iVector P, ui size, int q );
int VF_sinrpi2( fVector Y, iVector P, ui size, int q );
int VF_sinrpi3( fVector Y, iVector P, ui size, int q );
C++ VecObj#include <OptiVec.h>
int vector<T>::sinrpi( const vector<int>& P, int q );
int vector<T>::sinrpi2( const vector<int>& P, int q );
int vector<T>::sinrpi3( const vector<int>& P, int q );
Pascal/Delphiuses VFmath;
function VF_sinrpi( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
function VF_sinrpi2( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
function VF_sinrpi3( Y:fVector; P:iVector; size:UIntSize; q:Integer ): IntBool;
DescriptionYi = sin( (Pi / q) * p )
The sine of fractional multiples of p is calculated. There are three versions: VF_sinrpi is for general use with any arbitrary denominator q. If q is a power of 2, VF_sinrpi2 should be used which is a highly optimized version reading the results from a look-up table, if possible. If q is a multiple of 3, VF_sinrpi3 should be used. VF_sinrpi3 offers a convenient way to use degrees instead of radians; if, for example, q is 180, then the unit of the elements of P is "degree". VF_sinrpi2 and VF_sinrpi3 work also with q values they are not optimized for; in this case, however, memory space is wasted for the tables.
Error handlingThese functions should be error-proof, as long as q!=0.
Return valuealways FALSE (0)
See alsoVF_sin,   sin

VectorLib Table of Contents  OptiVec home