Codesnippets > Math

ATAN2 Function


Is it possible to implement this function in GLBasic?.

It is implemented? Its a bit confusing, but GLBasic's ATAN actually is what is called ATAN2 in other languages.

In other languages ATAN<>ATAN2.

This does not happen in GLB?

ATAN2 is simply a slightly improved ATAN with two parameters, there is no difference besides this. Have a look here:
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.

Thanks a million.

Much clearer now.


[0] Message Index

Go to full version