This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Cotan and fixed point problem


Cotan and fixed point problem

Postby BurnedImageGames » Dec 18, 2007 @ 8:24pm

I'm having problems getting the correct info from ClassEMath::Cotan. I would like to find an angle of a right triangle. Say x0,y0 = 0,0 and x1,y1 = 20,15. tanX = 15/20 = 0.75 the cotan would return the degree 36.87. I could then use this info to set a trajectory from x0,y0 to x1,y1. I understand that the value return by Cotan is fixed point. I have tried converting it but I can not tell if the problem is in my use of the Cotan function or the FixedToFloat function. Also is there a way I can draw the value of a float to the screen?
BurnedImageGames
pm Member
 
Posts: 1
Joined: Jul 18, 2007 @ 9:40pm


Re: Cotan and fixed point problem

Postby kuroneko » Dec 19, 2007 @ 3:18am

kuroneko
pm Member
 
Posts: 14
Joined: Mar 27, 2007 @ 5:38am


Postby edge » Dec 20, 2007 @ 12:46pm

Hi BurnedImageGames,

A function to get the angle based on the x/y difference will be added to an upcoming release.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron