July 25th, 2011, 12:50 PM
Changing my Locations.
I'm trying to program a virtual working Solar System in real time.
I've got all my formula's for gravity, centripetal force, orbital velocity, and I've related them to my code and how to change the x and y values as the object orbits another orbit.
My only issue is Location.
I can only seem to set my location to integers like (32,32). Where-as I would like to set them to positions with a decimal place to make things more accurate and run more smoothly. Like (32.43,32.43).
Is there anyway to do this?
I just keep getting that it is "not a valid value for Int32.".
July 25th, 2011, 01:17 PM
Re: Changing my Locations.
If you've created the methods, declare them as double, not int.
Click Here to Expand Forum to Full Width