manual cast to remove warning
This commit is contained in:
parent
617ecaba91
commit
0f0c2f8968
@ -350,7 +350,7 @@ bool less (sf::CircleShape a, sf::CircleShape b)
|
||||
}
|
||||
|
||||
// compute the cross product of vectors (center -> a) x (center -> b)
|
||||
int det = (ax - centerx) * (by - centery) - (bx - centerx) * (ay - centery);
|
||||
int det = (int)((ax - centerx) * (by - centery) - (bx - centerx) * (ay - centery));
|
||||
if (det < 0)
|
||||
return true;
|
||||
if (det > 0)
|
||||
@ -358,8 +358,8 @@ bool less (sf::CircleShape a, sf::CircleShape b)
|
||||
|
||||
// points a and b are on the same line from the center
|
||||
// check which point is closer to the center
|
||||
int d1 = (ax - centerx) * (ax - centerx) + (ay - centery) * (ay - centery);
|
||||
int d2 = (bx - centerx) * (bx - centerx) + (by - centery) * (by - centery);
|
||||
int d1 = (int)((ax - centerx) * (ax - centerx) + (ay - centery) * (ay - centery));
|
||||
int d2 = (int)((bx - centerx) * (bx - centerx) + (by - centery) * (by - centery));
|
||||
return d1 > d2;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user