Go to the source code of this file.
|
struct | Circle |
| define a Circle structure Has the fields hidden by struct circle as (Point* center) and (float radius) More...
|
|
allocate a new circle on memory based on its parameters
- Parameters
-
center_pointint | is the center point of the circle |
radius | is the radius of the circle |
- Returns
- the address of the allocated circle
void circle_free |
( |
Circle * |
c | ) |
|
free memory allocated by the circle c
- Parameters
-
c | a pointer to Circle structure |
void circle_get |
( |
Circle * |
c, |
|
|
Point * |
center, |
|
|
float * |
radius |
|
) |
| |
Get the its internal attributes through the pointers passed.
- Parameters
-
[in] | c | the desired circle as pointer |
[out] | center | the point pointer to save the center of c |
[out] | radius | the radius to save the radius of c |
Get the center of circle c.
- Parameters
-
[in] | c | the circle to get the /p center |
float circle_get_radius |
( |
Circle * |
c | ) |
|
Get the radius of circle c.
Check if the pointer /p point is inside of the circle.
- Parameters
-
c | is the circle to check |
point | is the point to check if is inside the /p c |
- Returns
- 1 if inside of the circle, otherwise 0
void circle_set |
( |
Circle * |
c, |
|
|
Point * |
center, |
|
|
float |
radius |
|
) |
| |
Set the values of center and radius of structure.
void circle_set_radius |
( |
Circle * |
c, |
|
|
float |
center |
|
) |
| |