Go to the source code of this file.
|
| #define | GM_MATH |
| #define | PI 3.14159265358979324 |
| | The mathematical constant Pi (π).
|
| #define | M_PI PI |
| | Alias for the mathematical constant Pi (π).
|
| #define | EPS 1e-17 |
| | A small epsilon value used for floating-point comparisons.
|
| #define | ln10 2.30258509299404590109 |
| | The natural logarithm of 10.
|
| #define | INF 1.0 / 0.0 |
| | Represents positive infinity for double-precision floating-point numbers.
|
| #define | NAN 0.0 / 0.0 |
| | Represents "Not a Number" for double-precision floating-point numbers.
|
| #define | MAX_double 1.7976931348623158e308 |
| | The maximum representable value for a double-precision floating-point number.
|
|
| double | tan (double x) |
| | Calculates the tangent of an angle (in radians).
|
| double | cos (double x) |
| | Calculates the cosine of an angle (in radians).
|
| double | sin (double x) |
| | Calculates the sine of an angle (in radians).
|
| double | ceil (double x) |
| | Calculates the smallest integer value greater than or equal to x.
|
| double | floor (double x) |
| | Calculates the largest integer value less than or equal to x.
|
| double | atan (double x) |
| | Calculates the arctangent of x.
|
| double | acos (double x) |
| | Calculates the arccosine of x.
|
| double | asin (double x) |
| | Calculates the arcsine of x.
|
| double | fmod (double x, double y) |
| | Calculates the floating-point remainder of x/y.
|
| double | exp (double x) |
| | Calculates the base-e exponential of x (e^x).
|
| double | log (double x) |
| | Calculates the natural logarithm of x (ln(x)).
|
| double | sqrt (double x) |
| | Calculates the square root of x.
|
| double | pow (double base, double vexp) |
| | Calculates the base raised to the power of the exponent (base^exp).
|
| double | fabs (double x) |
| | Calculates the absolute value of a double.
|
| void | translate (double x, struct special *_special) |
| double | atan_1_1 (double x) |
| double | delete (double x) |
| double | log_other (double x) |
| double | log_0_2 (double x) |
| int | min (int a, int b) |
| | Returns the smaller of two integer values.
|
| double | fmin (double a, double b) |
| | Returns the smaller of two double values.
|
| int | max (int a, int b) |
| | Returns the larger of two integer values.
|
| double | fmax (double a, double b) |
| | Returns the larger of two double values.
|
◆ EPS
A small epsilon value used for floating-point comparisons.
◆ GM_MATH
◆ INF
Represents positive infinity for double-precision floating-point numbers.
◆ ln10
| #define ln10 2.30258509299404590109 |
The natural logarithm of 10.
◆ M_PI
Alias for the mathematical constant Pi (π).
◆ MAX_double
| #define MAX_double 1.7976931348623158e308 |
The maximum representable value for a double-precision floating-point number.
◆ NAN
Represents "Not a Number" for double-precision floating-point numbers.
◆ PI
| #define PI 3.14159265358979324 |
The mathematical constant Pi (π).
◆ acos()
Calculates the arccosine of x.
- Parameters
-
| x | The floating-point value, expected to be in the range [-1, 1]. |
- Returns
- The arccosine of x in radians, in the range [0, PI], or NAN if x is out of range.
◆ asin()
Calculates the arcsine of x.
- Parameters
-
| x | The floating-point value, expected to be in the range [-1, 1]. |
- Returns
- The arcsine of x in radians, in the range [-PI/2, PI/2], or NAN if x is out of range.
◆ atan()
Calculates the arctangent of x.
- Parameters
-
| x | The floating-point value. |
- Returns
- The arctangent of x in radians, in the range [-PI/2, PI/2].
◆ atan_1_1()
| double atan_1_1 |
( |
double | x | ) |
|
◆ ceil()
Calculates the smallest integer value greater than or equal to x.
- Parameters
-
| x | The floating-point value. |
- Returns
- The ceiling of x.
◆ cos()
Calculates the cosine of an angle (in radians).
- Parameters
-
- Returns
- The cosine of x.
◆ delete()
| double delete |
( |
double | x | ) |
|
◆ exp()
Calculates the base-e exponential of x (e^x).
- Parameters
-
- Returns
- The value of e raised to the power of x.
◆ fabs()
Calculates the absolute value of a double.
- Parameters
-
| x | The floating-point value. |
- Returns
- The absolute value of x.
◆ floor()
Calculates the largest integer value less than or equal to x.
- Parameters
-
| x | The floating-point value. |
- Returns
- The floor of x.
◆ fmax()
| double fmax |
( |
double | a, |
|
|
double | b ) |
Returns the larger of two double values.
- Parameters
-
| a | The first double. |
| b | The second double. |
- Returns
- The larger of a and b.
◆ fmin()
| double fmin |
( |
double | a, |
|
|
double | b ) |
Returns the smaller of two double values.
- Parameters
-
| a | The first double. |
| b | The second double. |
- Returns
- The smaller of a and b.
◆ fmod()
| double fmod |
( |
double | x, |
|
|
double | y ) |
Calculates the floating-point remainder of x/y.
- Parameters
-
| x | The numerator. |
| y | The denominator. |
- Returns
- The remainder with the same sign as x.
◆ log()
Calculates the natural logarithm of x (ln(x)).
- Parameters
-
| x | The floating-point value. |
- Returns
- The natural logarithm of x, or NAN if x is negative, or -INF if x is zero.
◆ log_0_2()
| double log_0_2 |
( |
double | x | ) |
|
◆ log_other()
| double log_other |
( |
double | x | ) |
|
◆ max()
Returns the larger of two integer values.
- Parameters
-
| a | The first integer. |
| b | The second integer. |
- Returns
- The larger of a and b.
◆ min()
Returns the smaller of two integer values.
- Parameters
-
| a | The first integer. |
| b | The second integer. |
- Returns
- The smaller of a and b.
◆ pow()
| double pow |
( |
double | base, |
|
|
double | vexp ) |
Calculates the base raised to the power of the exponent (base^exp).
- Parameters
-
| base | The base value. |
| vexp | The exponent value. |
- Returns
- The result of base raised to the power of exp.
◆ sin()
Calculates the sine of an angle (in radians).
- Parameters
-
- Returns
- The sine of x.
◆ sqrt()
Calculates the square root of x.
- Parameters
-
| x | The non-negative floating-point value. |
- Returns
- The square root of x, or NAN if x is negative.
◆ tan()
Calculates the tangent of an angle (in radians).
- Parameters
-
- Returns
- The tangent of x, or NAN if x is an odd multiple of PI/2.
◆ translate()
| void translate |
( |
double | x, |
|
|
struct special * | _special ) |