Floating Point Error Safe for Vector = Vector in C++
<p>Getting an error after validating.   </p>

<p>Check if two TVECTOR's are equal to each other</p>

<p>IN:        v       First Vector
        w       Second Vector</p>

<p>RETURN:  True if v==w, False otherwise</p>

<p>NOTE:  Use's all four components
            Should be floating point error safe.</p>

<pre><code>bool Vector_IsEqual(TVECTOR v, TVECTOR w)
{

    for( int i = 0; i &lt; 4; i++ )
    {
        if( ( float ) v.e[ i ] == ( float ) w.e[ i ] ) {
            return true;
        }

        else {
        return false;
        }
    }
}

Inputs:
    &lt; -2,  0, -4,  1 &gt;
    &lt; -2,  1.9999999e-005, -4,  1 &gt;
Your output:
    true
Correct output:
    false
</code></pre>
