Robot Agent  1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
general.h
Go to the documentation of this file.
1 
12 #ifndef __GENERAL_H
13 #define __GENERAL_H
14 
15 /* -- Includes -- */
16 
17 /* -- Types -- */
18 
19 /* -- Constants -- */
20 
21 /* -- Function Prototypes -- */
22 
23 int general_bytes2int(unsigned char byte_high, unsigned char byte_low); // Convert two bytes to int (two's complement)
24 unsigned int general_bytes2uint(unsigned char byte_high, unsigned char byte_low); // Convert two bytes to unsigned int
25 void general_int2bytes(int integer, unsigned char *byte_high, unsigned char *byte_low); // Convert int to two bytes (two's complement)
26 
27 double general_gaussrand(double mu, double sigma); // Random number based on normal (gaussian) distribution
28 float general_gaussian(float mu, float sigma, int x); // Calculate Gaussian
29 
30 float general_dist_squared(int x1, int y1, int x2, int y2); // Calculate squared distance between two points
31 float general_dist2seg(int x, int y, int p1[], int p2[]); // Calculate distance from point to line segment
32 
33 void general_circle(int **arr, int cx, int cy, int radius); // Draw (fill) filled circle in 2D array
34 void general_circle_eight_points(int **arr, int cx, int cy, int x, int y); // Draw (fill) eight points - Part of general_circle() function
35 void general_circle_four_points(int **arr, int cx, int cy, int x, int y); // Draw (fill) four points - Part of general_circle() function
36 void general_circle_horizontal_line(int **arr, int x, int y, int len); // Draw (fill) horizontal line - Part of general_circle() function
37 
38 #endif /* __GENERAL_H */
void general_circle_four_points(int **arr, int cx, int cy, int x, int y)
Definition: general.c:230
float general_dist_squared(int x1, int y1, int x2, int y2)
Definition: general.c:141
float general_dist2seg(int x, int y, int p1[], int p2[])
Definition: general.c:154
double general_gaussrand(double mu, double sigma)
Definition: general.c:91
unsigned int general_bytes2uint(unsigned char byte_high, unsigned char byte_low)
Definition: general.c:52
void general_int2bytes(int integer, unsigned char *byte_high, unsigned char *byte_low)
Definition: general.c:69
void general_circle(int **arr, int cx, int cy, int radius)
Definition: general.c:180
int general_bytes2int(unsigned char byte_high, unsigned char byte_low)
Definition: general.c:29
void general_circle_eight_points(int **arr, int cx, int cy, int x, int y)
Definition: general.c:212
float general_gaussian(float mu, float sigma, int x)
Definition: general.c:128
void general_circle_horizontal_line(int **arr, int x, int y, int len)
Definition: general.c:244