--- a/hedgewars/uUtils.pas Sun Apr 17 11:57:46 2011 -0400
+++ b/hedgewars/uUtils.pas Sun Apr 17 12:48:32 2011 -0400
@@ -42,6 +42,7 @@
function DxDy2Angle(const _dY, _dX: hwFloat): GLfloat;
function DxDy2Angle32(const _dY, _dX: hwFloat): LongInt;
function DxDy2AttackAngle(const _dY, _dX: hwFloat): LongInt;
+function DxDy2AttackAngle(const _dY, _dX: extended): LongInt;
procedure SetLittle(var r: hwFloat);
@@ -182,6 +183,11 @@
DxDy2AttackAngle:= trunc(arctan2(dY, dX) * MaxAngleDivPI)
end;
+function DxDy2AttackAngle(const _dY, _dX: extended): LongInt; inline;
+begin
+DxDy2AttackAngle:= trunc(arctan2(_dY, _dX) * (cMaxAngle/pi))
+end;
+
procedure SetLittle(var r: hwFloat);
begin