SA-MP Forums Archive
Inverse sin/cos - 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: Inverse sin/cos (/showthread.php?tid=436015)



Inverse sin/cos - MP2 - 09.05.2013

There don't seem to be any inverse sin/cos functions.. wat do pls

EDIT: Oh wait..

pawn Код:
native Float:asin(Float:value);
native Float:acos(Float:value);
native Float:atan(Float:value);
Are these them? What's the 'a'? ;_;

EDIT2: I think the 'a' is for 'arc'.


Re: Inverse sin/cos - park4bmx - 09.05.2013

there are costume ones for Inverse Trigonomic Function
2 floats
(1) The length of the adjacent side
(2) The length of the hypotenuse side
Returns The processed inverse trigonomic equation (Float)

if that is what u want ?

edit its removed anyways


Re: Inverse sin/cos - dominik523 - 09.05.2013

atan, asin and acos are functions which gives you a value in radians.
When you get radians from it, if you want to get angle in degrees, you need to do
Код:
new Float:angle;
angle = asin(some value);
angle = angle * (180 /pi)
and from degrees to radians is
Код:
angle = angle * (pi / 180)