hedgewars/uFloat.pas
changeset 4415 941251bad467
parent 4374 bcefeeabaa33
child 4900 8ad0e23e6d63
equal deleted inserted replaced
4414:cb90b7f82cd5 4415:941251bad467
   146 {$IFNDEF FPC}
   146 {$IFNDEF FPC}
   147 type hwFloat = Extended;
   147 type hwFloat = Extended;
   148 {$ENDIF}
   148 {$ENDIF}
   149 
   149 
   150 implementation
   150 implementation
   151 //uses uMisc;
   151 uses uSinTable;
   152 
   152 
   153 
   153 
   154 {$IFDEF FPC}
   154 {$IFDEF FPC}
   155 
   155 
   156 function int2hwFloat (const i: LongInt) : hwFloat;
   156 function int2hwFloat (const i: LongInt) : hwFloat;
   347 begin
   347 begin
   348 // yes, we have negative zero for a reason
   348 // yes, we have negative zero for a reason
   349 if r.isNegative then hwSign:= -1 else hwSign:= 1
   349 if r.isNegative then hwSign:= -1 else hwSign:= 1
   350 end;
   350 end;
   351 
   351 
   352 {$INCLUDE "SinTable.inc"}
       
   353 
   352 
   354 function AngleSin(const Angle: Longword): hwFloat;
   353 function AngleSin(const Angle: Longword): hwFloat;
   355 begin
   354 begin
   356 {$IFDEF DEBUGFILE}
   355 {$IFDEF DEBUGFILE}
   357 //TryDo((Angle >= 0) and (Angle <= 2048), 'Sin param exceeds limits', true);
   356 //TryDo((Angle >= 0) and (Angle <= 2048), 'Sin param exceeds limits', true);