[Gambas-user] trigonometric function
Benoît Minisini
gambas at ...1...
Thu Oct 25 18:16:45 CEST 2012
Le 25/10/2012 17:44, piet at ...3034... a écrit :
>
>
> Hi,
>
> I just got a mathematic problem:
>
> I need the angle alpha and
> x and y are given.
>
> tan(alpha) = x / y
>
> so alpha = tan^-1(x/y)
>
> As I
> put tan^-1(x/y) in my own calculator, it works.
>
> But how do I express
> this in Gambas?
>
> (1 / (tan(x / y)) does'nt return me the same awnser..)
>
>
> Thanks for help
>
> Piet
>
Atn(x / y), or better Ang(x, y) or Atan2(x, y)
See the wiki documentation.
--
Benoît Minisini
More information about the User
mailing list