Author Topic: ATAN2 Function  (Read 1373 times)

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
ATAN2 Function
« on: 2014-May-01 »
Is it possible to implement this function in GLBasic?.

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
Re: ATAN2 Function
« Reply #1 on: 2014-May-01 »
It is implemented? Its a bit confusing, but GLBasic's ATAN actually is what is called ATAN2 in other languages.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: ATAN2 Function
« Reply #2 on: 2014-May-01 »
In other languages ATAN<>ATAN2.

This does not happen in GLB?

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
Re: ATAN2 Function
« Reply #3 on: 2014-May-01 »
ATAN2 is simply a slightly improved ATAN with two parameters, there is no difference besides this. Have a look here: en.wikipedia.org/wiki/Atan2
Usually in programming you need the 2 parameter version (and you can simply replace the 1 parameter version with the 2 one), so Gernot choose to simple only add ATAN2 and confusingly named it ATAN.

BTW. in my libQMATH you find both functions, maybe it helps you if you have a look at the qATAN2 function that I created.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: ATAN2 Function
« Reply #4 on: 2014-May-01 »
Thanks a million.

Much clearer now.