You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of my methods always returns a double regardless of the dimension (a ratio of overlap of two boxes, which is between 0.0 and 1.0 regardless of if the boxes are int, float, etc.
The last line of my method is
returnox * oy / getArea();
If the dimension is already a double, no problem. If it's an int or long, I need to cast area first so that it doesn't do integer division. How do I inject a (double) getArea() into the template but only when the dimension is not a double?
The text was updated successfully, but these errors were encountered:
One of my methods always returns a
double
regardless of the dimension (a ratio of overlap of two boxes, which is between0.0
and1.0
regardless of if the boxes are int, float, etc.The last line of my method is
If the dimension is already a
double
, no problem. If it's anint
orlong
, I need to cast area first so that it doesn't do integer division. How do I inject a(double) getArea()
into the template but only when the dimension is not a double?The text was updated successfully, but these errors were encountered: