hedgewars/uFloat.pas
changeset 7043 7c080e5ac8d0
parent 7042 de20086a6bcc
child 7515 8957b05d368a
equal deleted inserted replaced
7042:de20086a6bcc 7043:7c080e5ac8d0
    61 function hwFloat2Float (const i: hwFloat) : extended; inline;
    61 function hwFloat2Float (const i: hwFloat) : extended; inline;
    62 
    62 
    63 // The implemented operators
    63 // The implemented operators
    64 
    64 
    65 operator = (const z1, z2: hwFloat) z : boolean; inline;
    65 operator = (const z1, z2: hwFloat) z : boolean; inline;
       
    66 {$IFDEF PAS2C}
    66 operator <> (const z1, z2: hwFloat) z : boolean; inline;
    67 operator <> (const z1, z2: hwFloat) z : boolean; inline;
       
    68 {$ENDIF}
    67 operator + (const z1, z2: hwFloat) z : hwFloat; inline;
    69 operator + (const z1, z2: hwFloat) z : hwFloat; inline;
    68 operator - (const z1, z2: hwFloat) z : hwFloat; inline;
    70 operator - (const z1, z2: hwFloat) z : hwFloat; inline;
    69 operator - (const z1: hwFloat) z : hwFloat; inline;
    71 operator - (const z1: hwFloat) z : hwFloat; inline;
    70 
    72 
    71 operator * (const z1, z2: hwFloat) z : hwFloat; inline;
    73 operator * (const z1, z2: hwFloat) z : hwFloat; inline;
   211 operator = (const z1, z2: hwFloat) z : boolean; inline;
   213 operator = (const z1, z2: hwFloat) z : boolean; inline;
   212 begin
   214 begin
   213     z:= (z1.isNegative = z2.isNegative) and (z1.QWordValue = z2.QWordValue);
   215     z:= (z1.isNegative = z2.isNegative) and (z1.QWordValue = z2.QWordValue);
   214 end;
   216 end;
   215 
   217 
   216 
   218 {$IFDEF PAS2C}
   217 operator <> (const z1, z2: hwFloat) z : boolean; inline;
   219 operator <> (const z1, z2: hwFloat) z : boolean; inline;
   218 begin
   220 begin
   219     z:= (z1.isNegative <> z2.isNegative) or (z1.QWordValue <> z2.QWordValue);
   221     z:= (z1.isNegative <> z2.isNegative) or (z1.QWordValue <> z2.QWordValue);
   220 end;
   222 end;
   221 
   223 {$ENDIF}
   222 
   224 
   223 operator + (const z1, z2: hwFloat) z : hwFloat;
   225 operator + (const z1, z2: hwFloat) z : hwFloat;
   224 begin
   226 begin
   225 if z1.isNegative = z2.isNegative then
   227 if z1.isNegative = z2.isNegative then
   226     begin
   228     begin