ReactOS
0.4.15-dev-8614-gbc76250
ldiv.c
Go to the documentation of this file.
1
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2
#include <precomp.h>
3
4
#if (_MSC_VER >= 1920)
5
#pragma function(ldiv)
6
#endif
7
8
/*
9
* @implemented
10
*/
11
ldiv_t
12
ldiv
(
long
num
,
long
denom)
13
{
14
ldiv_t
r
;
15
16
if
(
num
> 0 && denom < 0)
17
{
18
num
= -
num
;
19
denom = -denom;
20
}
21
r
.quot =
num
/ denom;
22
r
.rem =
num
% denom;
23
if
(num < 0 && denom > 0)
24
{
25
if
(
r
.rem > 0)
26
{
27
r
.quot++;
28
r
.rem -= denom;
29
}
30
}
31
return
r
;
32
}
r
GLdouble GLdouble GLdouble r
Definition:
gl.h:2055
num
GLuint GLuint num
Definition:
glext.h:9618
ldiv
ldiv_t ldiv(long num, long denom)
Definition:
ldiv.c:12
_ldiv_t
Definition:
stdlib.h:43
sdk
lib
crt
math
ldiv.c
Generated on Sat Sep 7 2024 06:13:07 for ReactOS by
1.9.6