CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2011

    Changing my Locations.

    Hey there.
    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.".

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004

    Re: Changing my Locations.

    If you've created the methods, declare them as double, not int.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.