I am looking over some code and I was wondering what the friend operator is doing in this class header file.

Is this just needed to say that "when I am using this operator and both inputs are of type CSegment3D, I operate on them in the way defined in the function implementation"?

```
class CSegment3D : public CObject
{
public:
    CSegment3D& operator*=(const double& factor);//  multiply by a scalar factor & assign
    CSegment3D& operator/=(const double& factor);//  divide by a scalar factor & assign
    CSegment3D& operator+=(const CSegment3D& other);// vector addition
    CSegment3D& operator-=(const CSegment3D& other);// vector subtraction
    friend CSegment3D GetMidpoint(const CSegment3D& ptA, const CSegment3D& ptB);
    friend CSegment3D GetNormal( CSegment3D *pSeg1, CSegment3D *pSeg2, CSegment3D *pSeg3 ); // Return a point normal to the surface defines by the tree point passed in.
    friend double operator*(const CSegment3D& vectorA, const CSegment3D& vectorB); // dot product
    friend CSegment3D operator*(const double& factor, const CSegment3D& vectorA); // multiply by a scalar
    friend CSegment3D operator/(const CSegment3D& vectorA, const double& factor); // divide by a scalar
    friend CSegment3D operator+(const CSegment3D& vectorA, const CSegment3D& vectorB);// vector addition
    friend CSegment3D operator-(const CSegment3D& vectorA, const CSegment3D& vectorB );// vector subtraction
    friend CSegment3D operator^(const CSegment3D& vectorA, const CSegment3D& vectorB); // cross product
    friend CSegment3D operator%(CSegment3D vectorA, const CSegment3D& vectorB); // projection of vectorB onto vectorA
};

```