hedgewars/uMisc.pas
changeset 2389 bc3e45a4d5fb
parent 2382 bfd378dfc4e7
child 2392 a55dbef5cf31
equal deleted inserted replaced
2388:76ccf12faf22 2389:bc3e45a4d5fb
   168 var f: textfile;
   168 var f: textfile;
   169 {$ENDIF}
   169 {$ENDIF}
   170 
   170 
   171 function hwSign(r: hwFloat): LongInt;
   171 function hwSign(r: hwFloat): LongInt;
   172 begin
   172 begin
   173 if r.isNegative and (r.QWordValue > 0) then hwSign:= -1 else hwSign:= 1
   173 // yes, we have negative zero for a reason
       
   174 if r.isNegative then hwSign:= -1 else hwSign:= 1
   174 end;
   175 end;
   175 
   176 
   176 function Min(a, b: LongInt): LongInt;
   177 function Min(a, b: LongInt): LongInt;
   177 begin
   178 begin
   178 if a < b then Min:= a else Min:= b
   179 if a < b then Min:= a else Min:= b