(my)TinyLibC 0.0.1
little tiny pretty lib c
Loading...
Searching...
No Matches
tlcmaths.h
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2022
3** (my) Tiny Lib C
4** File description:
5** prototypes for math part
6*/
7
8#ifndef TLS_MATHS_H_
9 #define TLS_MATHS_H_
10
19 #define X_MAX(x, y) (((x) > (y)) ? (x) : (y))
20/*
21** @def X_MIN(x, y)
22** @brief minimum of x and y
23** @param x number 1
24** @param y number 2
25** @return minimum of x and y
26** @warning it's a macro, prefer to use x_min, x_mind, x_minf, x_minl
27**/
28 #define X_MIN(x, y) (((x) < (y)) ? (x) : (y))
29
35 #define X_E 2.7182818284
41 #define X_PI 3.1415926535
42
51int x_max(int a, int b);
52
61double x_maxd(double a, double b);
62
63
72float x_maxf(float a, float b);
73
82long double x_maxl(long double a, long double b);
83
92int x_min(int a, int b);
93
102double x_mind(double a, double b);
103
104
113float x_minf(float a, float b);
114
123long double x_minl(long double a, long double b);
124
133double x_pow(double x, double y);
134
143float x_powf(float x, float y);
144
153long double x_powl(long double x, long double y);
154
162double x_sqrt(double x);
163
171float x_sqrtf(float x);
172
180long double x_sqrtl(long double x);
181
182#endif
long double x_minl(long double a, long double b)
get min long double between a and b
int x_min(int a, int b)
get min int between a and b
float x_minf(float a, float b)
get min float between a and b
float x_maxf(float a, float b)
get max float between a and b
double x_mind(double a, double b)
get min double between a and b
int x_max(int a, int b)
get max int between a and b
double x_sqrt(double x)
compute the square root of x
double x_maxd(double a, double b)
get max double between a and b
double x_pow(double x, double y)
x raise to the power of y
long double x_sqrtl(long double x)
compute the square root of x
long double x_powl(long double x, long double y)
x raise to the power of y
long double x_maxl(long double a, long double b)
get max long double between a and b
float x_sqrtf(float x)
compute the square root of x
float x_powf(float x, float y)
x raise to the power of y