#include <math.h>
#include "cdl/sim_defs.hh"
Defines | |
#define | M2_PI |
Functions | |
double | saturate (const double x, const double dw_bnd, const double up_bnd) |
double | sign (const double x) |
double | fmax (double a, double b) |
double | fmin (double a, double b) |
bool | approx_equal (double x, double y, double tol) |
double | angle_diff (double a1, double a2, double offset) |
|
This macro defines 2*pi for efficiency. |
|
This function returns the difference angle between two angles (a1
|
|
This function implements an approximate equality check with the specified tolerance. It is useful for equality comparison of floating point numbers. |
|
This function returns the maximum of two floating point numbers |
|
This function returns the minimum of two floating point numbers |
|
This function defines a saturation function. It limits a given input to an interval [dw_bnd, up_bnd] |
|
This function implements the signum function. It returns either -1, 0 or 1 depending on whether the input argument is negative, 0 or positive, respectively. |