hedgewars/uFloat.pas
changeset 2300 d633bc70c893
parent 1915 c357f5b55320
child 2587 0dfa56a8513c
equal deleted inserted replaced
2299:ac9a2f2431c7 2300:d633bc70c893
   271 if z.isNegative then cstr:= '-' + cstr
   271 if z.isNegative then cstr:= '-' + cstr
   272 end;
   272 end;
   273 
   273 
   274 function hwRound(const t: hwFloat): LongInt;
   274 function hwRound(const t: hwFloat): LongInt;
   275 begin
   275 begin
   276 if t.isNegative then hwRound:= -t.Round
   276 if t.isNegative then hwRound:= -(t.Round and $7FFFFFFF)
   277                 else hwRound:= t.Round
   277                 else hwRound:= t.Round and $7FFFFFFF
   278 end;
   278 end;
   279 
   279 
   280 function hwAbs(const t: hwFloat): hwFloat;
   280 function hwAbs(const t: hwFloat): hwFloat;
   281 begin
   281 begin
   282 hwAbs:= t;
   282 hwAbs:= t;