See ChangeLog entry 19990804-00:15 EDT David G. Holm <dholm@jsd-llc.com>
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
19990804-00:15 EDT David G. Holm <dholm@jsd-llc.com>
|
||||
* source/rtl/math.c
|
||||
! Corrected MOD() to set the correct number of decimal points.
|
||||
* source/vm/hvm.c
|
||||
! Corrected Div() to set the correct number of decimal points.
|
||||
! Corrected Modulus() to use fmod() instead of the % operator.
|
||||
! Corrected Modulus() to set the correct number of decimal points.
|
||||
|
||||
19990803-22:10 EDT David G. Holm <dholm@jsd-llc.com>
|
||||
* source/rtl/setcolor.c
|
||||
+ Added missing '#ifdef HARBOUR_USE_GTAPI'.
|
||||
|
||||
@@ -244,9 +244,15 @@ FUNCTION MOD(cl_num, cl_base)
|
||||
hb_retnd(dResult + dBase);
|
||||
else
|
||||
hb_retnd(dResult);
|
||||
/* Always set default number of decimals after computing mod */
|
||||
stack.Return.item.asDouble.decimal = hb_set.HB_SET_DECIMALS;
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retnd(dNumber);
|
||||
/* Set the correct number of decimals */
|
||||
stack.Return.item.asDouble.decimal = (pNumber->item.asDouble.decimal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -702,7 +702,9 @@ void Div( void )
|
||||
double d2 = PopDouble( &wDec2 );
|
||||
double d1 = PopDouble( &wDec1 );
|
||||
|
||||
PushNumber( d1 / d2, (wDec1>wDec2) ? wDec1 : wDec2 );
|
||||
/* NOTE: Clipper always returns the result of a division
|
||||
with the SET number of decimal places. */
|
||||
PushNumber( d1 / d2, hb_set.HB_SET_DECIMALS );
|
||||
}
|
||||
|
||||
void Do( WORD wParams )
|
||||
@@ -1346,7 +1348,9 @@ void Modulus( void )
|
||||
double d2 = PopDouble( &wDec2 );
|
||||
double d1 = PopDouble( &wDec1 );
|
||||
|
||||
PushNumber( ( long ) d1 % ( long ) d2, (wDec1>wDec2) ? wDec1 : wDec2 );
|
||||
/* NOTE: Clipper always returns the result of modulus
|
||||
with the SET number of decimal places. */
|
||||
PushNumber( fmod( d1, d2 ), hb_set.HB_SET_DECIMALS );
|
||||
}
|
||||
|
||||
void Mult( void )
|
||||
|
||||
Reference in New Issue
Block a user