Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygendiv.c
Go to the documentation of this file.
00001 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ 00002 #include <precomp.h> 00003 00004 /* 00005 * @implemented 00006 */ 00007 div_t 00008 div(int num, int denom) 00009 { 00010 div_t r; 00011 00012 if (num > 0 && denom < 0) { 00013 num = -num; 00014 denom = -denom; 00015 } 00016 r.quot = num / denom; 00017 r.rem = num % denom; 00018 if (num < 0 && denom > 0) 00019 { 00020 if (r.rem > 0) 00021 { 00022 r.quot++; 00023 r.rem -= denom; 00024 } 00025 } 00026 return r; 00027 } Generated on Fri May 25 2012 04:34:54 for ReactOS by
1.7.6.1
|