SA-MP Forums Archive
Get oposite angle of ball - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Get oposite angle of ball (/showthread.php?tid=622287)



Get oposite angle of ball - MerryDeer - 20.11.2016

Hi,

I'am making pool. I have ball, with angle, how to get oposite angle? if i add just -angle, it's not always correct, maybe there is another way?


Re: Get oposite angle of ball - NaS - 20.11.2016

A negative angle does not "revert" the direction, that in fact only works for 90°. This operation changes a clockwise angle to counter-clockwise, which is something different.

You can add or substract 180.0 to/from the angle to make it face the opposite direction.