ReactOS 0.4.16-dev-226-g79f2289
ldiv.c File Reference
#include <precomp.h>
Include dependency graph for ldiv.c:

Go to the source code of this file.

Functions

ldiv_t ldiv (long num, long denom)
 

Function Documentation

◆ ldiv()

ldiv_t ldiv ( long  num,
long  denom 
)

Definition at line 12 of file ldiv.c.

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}
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLuint GLuint num
Definition: glext.h:9618
Definition: stdlib.h:43