 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
sanbikinoraion Guest
|
Posted: Fri Jan 12, 2007 10:27 pm Post subject: Converting float/double to hires coords. |
|
|
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
|
Posted: Sun Jan 14, 2007 4:06 am Post subject: Re: Converting float/double to hires coords. |
|
|
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 |
|
 |
|
|
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
|
|