- Small optimization to hwFloat
authorunc0rr
Thu, 08 May 2008 20:54:04 +0000
changeset 918 c8cff180da57
parent 917 e59614bffc3f
child 919 fadfefc2ae40
- Small optimization to hwFloat - More informative debug in rndSign
hedgewars/uRandom.pas
--- a/hedgewars/uRandom.pas	Thu May 08 20:30:34 2008 +0000
+++ b/hedgewars/uRandom.pas	Thu May 08 20:54:04 2008 +0000
@@ -65,12 +65,10 @@
 end;
 
 function GetRandom: hwFloat;
-var r: hwFloat;
 begin
 GetNext;
-r.isNegative:= false;
-r.QWordValue:= GetNext;
-GetRandom:= r
+GetRandom.isNegative:= false;
+GetRandom.QWordValue:= GetNext
 end;
 
 function GetRandom(m: LongWord): LongWord;
@@ -82,7 +80,7 @@
 function rndSign(num: hwFloat): hwFloat;
 begin
 num.isNegative:= odd(GetNext);
-if num.isNegative then AddFileLog('isNegative TRUE') else AddFileLog('isNegative FALSE');
+AddFileLog(inttostr(n)  +' rnd ' + inttostr(cirbuf[n]));
 rndSign:= num
 end;