adds two vectors Vect operator+( const Vect& vectA, const Vect& vectB )

What will be an ideal response?

```
{
double r, theta;
double xcomp, ycomp;
xcomp = vectA.xcomponent( vectA ) + vectB.xcomponent( vectB );
ycomp = vectA.ycomponent( vectA ) + vectB.ycomponent( vectB );
r = sqrt( (xcomp * xcomp) + (ycomp * ycomp));
theta = atan( ycomp / xcomp );
//if quadrant II, add Pi
if( xcomp > 0 && ycomp < 0 )
theta += Pi;
//if quadrant III, add Pi
else if( xcomp < 0 && ycomp < 0 )
theta += Pi;
//if quadrant IV, add 2*Pi
else if( xcomp < 0 && ycomp < 0 )
theta += 2 * Pi;
Vect sum( r, theta );
return sum;
}
```

Computer Science & Information Technology

You might also like to view...

Your company has recently decided to implement a new biometric system to secure access to your company's data center. Management has decided to implement the biometric system in which the colored portion of the eye, including all rifts, coronas, and furrows are measured. Which biometric system should you purchase?

A. Iris scan B. Retina scan C. Eigenfeatures facial scan D. Eigenfaces facial scan

Computer Science & Information Technology

The index of the first item in an array is always one.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology