adds vector B to vector A Vect& operator+=( Vect& vectA, const Vect& vectB )
What will be an ideal response?
```
{
double xcomp, ycomp;
xcomp = vectA.xcomponent( vectA ) + vectB.xcomponent( vectB );
ycomp = vectA.ycomponent( vectA ) + vectB.ycomponent( vectB );
vectA.r = sqrt( (xcomp * xcomp) + (ycomp * ycomp));
vectA.theta = atan( ycomp / xcomp );
//if quadrant II, add Pi
if( xcomp > 0 && ycomp < 0 )
vectA.theta += Pi;
//if quadrant III, add Pi
else if( xcomp < 0 && ycomp < 0 )
vectA.theta += Pi;
//if quadrant IV, add 2*Pi
else if( xcomp > 0 && ycomp < 0 )
vectA.theta += 2 * Pi;
return vectA;
}
```
You might also like to view...
The __________ method can be used to place a new item at any position in a ListBox.
a. Items.New b. Items.Add c. Items.Append d. Items.Insert
A Process Identifier is used to identify how long a process has been running
Indicate whether the statement is true or false
To access Remote Assistance in Windows 8, display the ________, click the Search option, and type Remote Assistance in the search term box
A) Action Center B) Notification area C) Charms bar D) taskbar
What type of Windows network model allows all the participants to be represented equally on the network with no single computer having authority or control over another?
A. Domain B. Workgroup C. Shared D. Client/Server