d02111da4f
- Code refactoring - Optimization of code (for example, log2(n) searching) and memory usage - Some possible memory corruption fixed - Previous graph will be erased from window if error occured - Fixed bug with provided array of non-sorted points: so now you can pass points in any order - Fixed important bug with graphic rendering (big thanks to turbocat for asm rounding function) - Changed error messages; now you can see line/byte of file where syntax error is; added checking if provided frame of graph is invalid - Autochoosing of an optimal single step for both axises - Added support for reading any number of different functions. You will have to end previous function with ';' if you want to pass another one. They will be rendered on a graph in order you passed them. git-svn-id: svn://kolibrios.org@9778 a494cfbc-eb01-0410-851d-a64ba20cac60
28 lines
474 B
C
Executable File
28 lines
474 B
C
Executable File
#ifndef FUNC_H
|
|
#define FUNC_H
|
|
|
|
#define ERROR 8888888888.9
|
|
#define ERROR_END 8888888888.7
|
|
|
|
extern char debuf[50];
|
|
|
|
typedef struct {
|
|
double x, y;
|
|
} TCoord;
|
|
|
|
double textwidth(const char* s, int len);
|
|
double textheight(const char* s, int len);
|
|
|
|
int isalpha(char c);
|
|
double convert(const char* s, int* len);
|
|
|
|
static inline
|
|
int roundi(double a) {
|
|
return round(a);
|
|
}
|
|
|
|
#define EQUALITY_VAL 0.000001
|
|
int isequal(double a, double b);
|
|
|
|
#endif /* FUNC_H */
|