Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Arctan

0 replies · 3,083 views · Started 03 September 2008

*sigh*
And I come for help again >_<

	void Beam1(int x,int y){
lweapon Beam1 = Screen->CreateLWeapon(31);
Beam1->Tile = Beam1Tile;
Beam1->CSet = Beam1CSet;
Beam1->Step = 3;
Beam1->Damage = Beam1Damage;
Beam1->X = 120;
Beam1->Y = 0;
Beam1->Angular = true;
Beam1->Angle = ArcTan((x-Beam1->X),(y-Beam1->Y));
}

This seems to only work in the bottom 'quarter'.
Why should that be?
I can't see anything wrong with the code...

EDIT:
Ok, nevermind.

	void Beam1(int x,int y){
lweapon Beam1 = Screen->CreateLWeapon(31);
Beam1->Tile = Beam1Tile;
Beam1->CSet = Beam1CSet;
Beam1->Step = 3;
Beam1->Damage = Beam1Damage;
Beam1->X = 120;
Beam1->Y = 2;
Beam1->Angular = true;
Beam1->Angle = ArcTan((x-Beam1->X),(y-Beam1->Y));
}

Appears to work ok.