hedgewars/uFloat.pas
changeset 543 465e2ec8f05f
parent 538 74219eadab5e
child 611 8cf6d27cec86
equal deleted inserted replaced
542:ec26095f1bed 543:465e2ec8f05f
   212          ((z2.QWordValue and $8000000000000000) = 0) do
   212          ((z2.QWordValue and $8000000000000000) = 0) do
   213          begin
   213          begin
   214          t.QWordValue:= t.QWordValue shl 1;
   214          t.QWordValue:= t.QWordValue shl 1;
   215          z2.QWordValue:= z2.QWordValue shl 1
   215          z2.QWordValue:= z2.QWordValue shl 1
   216          end;
   216          end;
   217    z.Frac:= (t.QWordValue) div (z2.Round)
   217    if z2.Round > 0 then z.Frac:= (t.QWordValue) div (z2.Round)
       
   218                    else z.Frac:= 0
   218    end
   219    end
   219 end;
   220 end;
   220 
   221 
   221 operator / (const z1: hwFloat; const z2: LongInt) z : hwFloat;
   222 operator / (const z1: hwFloat; const z2: LongInt) z : hwFloat;
   222 begin
   223 begin