Changing my Locations.
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Changing my Locations.

  1. #1
    Join Date
    Jul 2011
    Posts
    1

    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
    Posts
    11,196

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center