2004-01-13 09:35 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* xharbour/source/rtl/mod.c
! fixed mod() function to be Clipper/DBASE III compatible
(not the % operator) for combination of psitive and negative
numbers
This commit is contained in:
@@ -8,6 +8,12 @@
|
||||
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2004-01-13 09:35 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* xharbour/source/rtl/mod.c
|
||||
! fixed mod() function to be Clipper/DBASE III compatible
|
||||
(not the % operator) for combination of psitive and negative
|
||||
numbers
|
||||
|
||||
|
||||
2004-01-13 08:15 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
+ harbour/include/hbfixdj.h
|
||||
|
||||
@@ -76,7 +76,11 @@ HB_FUNC( MOD )
|
||||
|
||||
if( dBase )
|
||||
{
|
||||
hb_retnd( fmod( dNumber, dBase ) );
|
||||
double dResult = fmod( dNumber, dBase );
|
||||
|
||||
if ( dResult && ( dNumber > 0 ? dBase < 0 : dBase > 0 ) )
|
||||
dResult += dBase;
|
||||
hb_retnd( dResult );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user