|
Data Structures Lerax
v3.0-104-ge031
Opinionated Data Structures & Algorithms
|
#include "../point/point.h"Go to the source code of this file.
Data Structures | |
| struct | Circle |
| define a Circle structure Has the fields hidden by struct circle as (Point* center) and (float radius) More... | |
Typedefs | |
| typedef struct Circle | Circle |
| Represents a circle in a 2D plane. | |
Functions | |
| Circle * | circle_create (Point *center, float radius) |
| allocate a new circle on memory based on its parameters | |
| void | circle_free (Circle *c) |
| free memory allocated by the circle c | |
| void | circle_set_center (Circle *c, Point *center) |
| Set the circle center. | |
| void | circle_set_radius (Circle *c, float center) |
| Set the circle radius. | |
| void | circle_set (Circle *c, Point *center, float radius) |
| Set the values of center and radius of structure. | |
| float | circle_get_radius (Circle *c) |
| Get the radius of circle c. | |
| Point * | circle_get_center (Circle *c) |
| Get the center of circle c. | |
| void | circle_get (Circle *c, Point *center, float *radius) |
| Get the its internal attributes through the pointers passed. | |
| int | circle_point_inside (Circle *c, Point *point) |
| Check if the pointer /p point is inside of the circle. | |
| typedef struct Circle Circle |
Represents a circle in a 2D plane.
A circle is defined by its center point and radius.