Jump to content

A demo of the atan2() function approach, to calculate the angle between 2 points. 1.0.1

   (0 reviews)

About This File

Find attached a small demo program that calculates the angle between the middle point of the sceen and the mouse pointer position.

This demo only runs on the R39 emulator version of the cx16.

 

The angle calculated is between 0 and 63, so each quadrant in the circle has 16 different angles (0 to 15).

Please comment to the following article that goes into details on this atan2() approach ...

Sven

Edited by svenvandevelde


What's New in Version 1.0.1   See changelog

Released

Made the logic working on the R38 and R39.


try_it

Yes

try_it_start_prg

cx16-atan2.prg
  • Like 1
 Share


User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
×
×
  • Create New...

Important Information

Please review our Terms of Use