Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. bool BasicCircle::checkCollision(BasicCircle * circle2)
  2. {
  3. float dx = circle2->_ellipse.point.x - this->_ellipse.point.x;
  4. float dy = circle2->_ellipse.point.y - this->_ellipse.point.y;
  5. float radii = this->_ellipse.radiusX + circle2->_ellipse.radiusX;
  6.  
  7. if ((dx * dx) + (dy * dy) < radii * radii)
  8. {
  9. return true;
  10. }
  11. else
  12. {
  13. return false;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement