JavaScript to C++ conversion: error with the % operator
<p>JavaScript:</p>

<pre><code>var lon2 = (lon1.toRad()+L+3*Math.PI)%(2*Math.PI) - Math.PI;
</code></pre>

<p>I have converted to c++:</p>

<pre><code>double lon2 = (Deg2Rad(lon1)+L+3*PI)%(2*PI) - PI;
</code></pre>

<p>Note: Deg2Rad func returns double, PI is a double also, L and lon1 also double. Then I got the following errors for the same line:</p>

<pre><code>error C2296: '%' : illegal, left operand has type 'double'
error C2297: '%' : illegal, right operand has type 'double'
</code></pre>

<p>Whats wrong with this <code>%</code> modulo?</p>
