|
Bsoft
1.9
Bernard's software package
|
Header file for trigonometry functions. More...
Go to the source code of this file.
Macros | |
| #define | TRIGPRECISION 1e-14 |
Functions | |
| double | bcos (double x) |
| Avoid non-zero values for cos(PI/2) and cos(-PI/2). More... | |
| double | bsin (double x) |
| Avoid non-zero values for sin(PI) and sin(-PI). More... | |
| double | btan (double x) |
| Avoid non-zero values for tan(PI) and tan(-PI). ATTENTION: tan function return a bigg value for tan(PI/2) and tan(-PI/2) even if tangent it is not define for these values. More... | |
| double | bacos (double x) |
| Wrapper to avoid NaN's returned from acos. More... | |
| double | basin (double x) |
| Wrapper to avoid NaN's returned from asin. More... | |
| double | batan2 (double y, double x) |
| Sets small values to zero before calling atan2. More... | |
Header file for trigonometry functions.
Definition in file trigonometry.h.
| #define TRIGPRECISION 1e-14 |
Definition at line 9 of file trigonometry.h.
| double bacos | ( | double | x | ) |
Wrapper to avoid NaN's returned from acos.
Sets large values to +-1 before calling acos.
| x | value. |
Definition at line 89 of file trigonometry.cpp.
| double basin | ( | double | x | ) |
Wrapper to avoid NaN's returned from asin.
Sets large values to +-1 before calling asin.
| x | value. |
Definition at line 105 of file trigonometry.cpp.
| double batan2 | ( | double | y, |
| double | x | ||
| ) |
Sets small values to zero before calling atan2.
If x or y is lower than TRIGPRECISION, it is set to zero.
| x | value of coordinate in x. |
| y | value of coordinate in y. |
Definition at line 122 of file trigonometry.cpp.
| double bcos | ( | double | x | ) |
Avoid non-zero values for cos(PI/2) and cos(-PI/2).
If x is aproximately PI/2, or -PI/2: return 0 otherwise: return cos(x)
| x | angle in radians. |
Definition at line 27 of file trigonometry.cpp.
| double bsin | ( | double | x | ) |
Avoid non-zero values for sin(PI) and sin(-PI).
If x is aproximately PI or -PI: return 0 otherwise: return sin(x)
| x | angle in radians. |
Definition at line 48 of file trigonometry.cpp.
| double btan | ( | double | x | ) |
Avoid non-zero values for tan(PI) and tan(-PI). ATTENTION: tan function return a bigg value for tan(PI/2) and tan(-PI/2) even if tangent it is not define for these values.
If x is aproximately PI or -PI: return 0 Otherwise: return tan(x)
| x | x represent radians. |
Definition at line 71 of file trigonometry.cpp.