Phoenix_x

Untitled

Oct 19th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.90 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include<iostream>
  3. using namespace std;
  4.  
  5. struct Circle
  6. {
  7.     int x;
  8.     int y;
  9.     int radius;
  10. };
  11.  
  12. struct BoundingBox
  13. {
  14.     int bottomLeftAngleX;
  15.     int bottomLeftAngleY;
  16.     int topRightAngleX;
  17.     int topRightAngleY;
  18. };
  19.  
  20. struct Coordinate
  21. {
  22.     int x;
  23.     int y;
  24. };
  25.  
  26. int main()
  27. {
  28.  
  29.     return 0;
  30. }
  31.  
  32. Circle circleCoordinates(int x, int y, int radius) //creates circle
  33. {
  34.     struct Circle circle;
  35.     circle.x = x;
  36.     circle.y = y;
  37.     circle.radius = radius;
  38.  
  39.     return circle;
  40. }
  41.  
  42. BoundingBox circleBoundingBox(Circle circle) //creates bounding box with parameter a circle
  43. {
  44.     BoundingBox boundingBox;
  45.  
  46.     boundingBox.bottomLeftAngleX = circle.x - circle.radius;
  47.     boundingBox.bottomLeftAngleY = circle.y - circle.radius;
  48.  
  49.     boundingBox.topRightAngleX = circle.x + circle.radius;
  50.     boundingBox.topRightAngleY = circle.y + circle.radius;
  51.  
  52.     return boundingBox;
  53. }
  54.  
  55. int extractCircleBoundingBox()
  56. {
  57.  
  58. }
Advertisement
Add Comment
Please, Sign In to add comment