Jump to content
  • Advertisement
Sign in to follow this  
MTclip

strange value from a float...

This topic is 4772 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

what would it mean if a float variable returns a value of "-1. #IND" im using msvc++.. I am guessing that it means it is undefinded.. but if that is the case how can a variable become undefined when i never goes out of scope... or does it mean that it is full.. the float is fine until i do some calculations on it.. then whammm!! "-1. IND" lost...and .. confused ;P

Share this post


Link to post
Share on other sites
Advertisement
I guess you tried to take the square root of a negative number, or something like that. IND might mean INvaliD :)

Share this post


Link to post
Share on other sites
that was a good idea... so i checked but there is noway that is the prob .. the only sqrt i have is used to find the distance (x*x + y*y) .. so im safe there....

any other ideas..

Share this post


Link to post
Share on other sites
It was the divide by 0 thanks for that... I was always told that if your program divided by zero it would crash... guess thats wrong...

Share this post


Link to post
Share on other sites
I think that's only with integers. Floats / doubles have a mechanism that tells you about the situation rather than just crashing

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!