Fix hwSign to give 1 on -0 value
authorunc0rr
Tue, 28 Jul 2009 12:32:33 +0000
changeset 2279 ef19b949ad30
parent 2278 28519f4f3f21
child 2280 786fb5d8107d
Fix hwSign to give 1 on -0 value
hedgewars/uMisc.pas
--- a/hedgewars/uMisc.pas	Sun Jul 26 20:56:18 2009 +0000
+++ b/hedgewars/uMisc.pas	Tue Jul 28 12:32:33 2009 +0000
@@ -170,7 +170,7 @@
 
 function hwSign(r: hwFloat): LongInt;
 begin
-if r.isNegative then hwSign:= -1 else hwSign:= 1
+if r.isNegative and (r.QWordValue > 0) then hwSign:= -1 else hwSign:= 1
 end;
 
 function Min(a, b: LongInt): LongInt;