hedgewars/uFloat.pas
changeset 5192 881c14f81d12
parent 5151 cbadb9fa52fc
child 5319 51d8e4747876
equal deleted inserted replaced
5190:9edb5ae12cfb 5192:881c14f81d12
   190 end;
   190 end;
   191 
   191 
   192 function hwFloat2Float (const i: hwFloat) : extended;
   192 function hwFloat2Float (const i: hwFloat) : extended;
   193 begin
   193 begin
   194 hwFloat2Float:= i.QWordValue / $100000000;
   194 hwFloat2Float:= i.QWordValue / $100000000;
   195 if i.isNegative then hwFloat2Float:=hwFloat2Float*-1;
   195 if i.isNegative then hwFloat2Float:= -hwFloat2Float;
   196 end;
   196 end;
   197 
   197 
   198 operator + (const z1, z2: hwFloat) z : hwFloat;
   198 operator + (const z1, z2: hwFloat) z : hwFloat;
   199 begin
   199 begin
   200 if z1.isNegative = z2.isNegative then
   200 if z1.isNegative = z2.isNegative then