libcalendars  0.1.0
cl-math.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 - Soroush Rabiei, <soroush@ametisco.ir>
3  * This file is part of libcalendar.
4  *
5  * libcalendar is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * libcalendar is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with libcalendar. If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 #ifndef LIBCALENDAR_MATH_H
21 #define LIBCALENDAR_MATH_H
22 
23 #include <math.h>
24 #include <stdlib.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
33 div_t clm_pdiv(int d, int v);
34 
38 int clm_floor_div(int a, int b);
39 
43 int clm_mod(int a, int b);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif /* LIBCALENDAR_MATH_H */
int clm_floor_div(int a, int b)
Floor Division Function.
Definition: cl-math.c:57
int clm_mod(int a, int b)
Modular Division Function.
Definition: cl-math.c:69
div_t clm_pdiv(int d, int v)
Division with Positive Ramainder.
Definition: cl-math.c:34