The operator * is undefined for the argument type(s) double, Point2D.Double
<p>I'm not sure what's going on here but here's a section I'm having problems with(there's a few others but I think if I can figure out the logic here I can apply it elsewhere). 
I recently had a problem where I was using point but couldn't get decimals so, <a href="http://stackoverflow.com/questions/9874487/is-there-an-easy-way-for-a-newbie-to-allow-point-to-accept-doubles-or-is-there-a">as suggested</a>, I switched to <a href="http://docs.oracle.com/javase/7/docs/api/java/awt/geom/Point2D.Double.html" rel="nofollow">point2D</a> to allow for doubles.  Since switching I have been getting errors that I can't seem to understand how to fix because I don't see the cause(I know changing to point2D triggered it but I can't see the connection).</p>

<p>I have the following code:</p>

<pre><code>Double x_data = (Double) data.get(k); 
for (int c = 0; c &lt;= 100; c++) { //the c variable caps the percent
    double percent = roundTwoDecimals(c*.01);
    double value1 =(sum - percent * x_data);
</code></pre>

<p>data is a list of point2D(which I'm casting to to double and sum is a variable I send in to this method that is really an integer but I cast it as a double. In eclipse I get the dreaded red underline under 'percent * x_data'. I googled and saw this error is often caused by someone trying to multiply a string or something but I'm fairly certain these all doubles. I get the following error now:</p>

<pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
    The operator * is undefined for the argument type(s) double, Point2D.Double
    The operator * is undefined for the argument type(s) double, Point2D.Double
    Syntax error, insert ")" to complete ArgumentList
    The operator * is undefined for the argument type(s) double, Point2D.Double
</code></pre>

<p>As far as I can tell everything involved in this process is either double or casted to double so I'm not sure why Point2D is involved in these operators.</p>

<p>Also I had a method that limited decimal places:</p>

<pre><code>static double roundTwoDecimals(double d) {
        DecimalFormat twoDForm = new DecimalFormat("#.###");
        return Double.valueOf(twoDForm.format(d));
</code></pre>

<p>but Double.valueOf is not one of the options anymore so I got errors(Point2D errors) on that(to get around it, I just return d back right now without limiting the decimals). </p>

<p>Please help. I don't think there is a problem with point2D or anything but I must be structurally doing something wrong.</p>

<p>Thanks</p>
