diff -r 4939254196d6 -r 9f12da88d769 hedgewars/uFloat.pas --- a/hedgewars/uFloat.pas Sat Jan 10 12:02:58 2009 +0000 +++ b/hedgewars/uFloat.pas Sat Jan 10 12:36:05 2009 +0000 @@ -19,6 +19,8 @@ unit uFloat; interface +{$INCLUDE options.inc} + {$IFDEF FPC} {$ifdef FPC_LITTLE_ENDIAN} type hwFloat = record @@ -332,6 +334,9 @@ function AngleSin(const Angle: Longword): hwFloat; begin +{$IFDEF DEBUGFILE} +TryDo((Angle >= 0) and (Angle < 2048), 'Sin param exceeds limits', true); +{$ENDIF} AngleSin.isNegative:= false; if Angle < 1024 then AngleSin.QWordValue:= SinTable[Angle] else AngleSin.QWordValue:= SinTable[2048 - Angle] @@ -339,6 +344,9 @@ function AngleCos(const Angle: Longword): hwFloat; begin +{$IFDEF DEBUGFILE} +TryDo((Angle >= 0) and (Angle < 2048), 'Cos param exceeds limits', true); +{$ENDIF} AngleCos.isNegative:= Angle > 1024; if Angle < 1024 then AngleCos.QWordValue:= SinTable[1024 - Angle] else AngleCos.QWordValue:= SinTable[Angle - 1024]