AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Converting float/double to hires coords.

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> 3D Graphics API's for Java
View previous topic :: View next topic  
Author Message
sanbikinoraion
Guest





PostPosted: Fri Jan 12, 2007 10:27 pm    Post subject: Converting float/double to hires coords. Reply with quote



Hi,

Does anyone know of any way of easily converting floats or doubles into
hires coords? My plan is to use a locale for each planet in the solar
system, and write a custom rotationinterpolator that will rotate the
locales around the sun locale. My plan was to store and manipulate the
coordinates of the planets in an easier-to-use form than hires coords,
and then scale the doubles up to hi-res coords once the new planet
position has been calculated.

Any help in this matter would be greatly appreciated.

Cheers,

-sanbikinoraion
Back to top
Thomas Enzinger
Guest





PostPosted: Sun Jan 14, 2007 4:06 am    Post subject: Re: Converting float/double to hires coords. Reply with quote



Hallo,

it is easy

double doux = 12.345;
String dx = String.valueOf(doux);
dx = dx.split(".")[0];

int[] x = new int[8];
.....

denn Rest darfst du selbst herausfinden ;-)


MfG,
Thomas
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> 3D Graphics API's for Java All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.