Jump to content
  • Advertisement
Sign in to follow this  
MTclip

how can this return that value?

This topic is 4619 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

// already defined //UINT m_xVertexCount = 64 //D3DXVECTOR3 rVec .x = -87.551186 UINT row = ((float)m_xVertexCount * 0.5f) + rVec.x ; when those values are put throught the above .. row = 4294967241 ?? I dont get it.. some times it will return the correct value I got the values from breaking and checking...

Share this post


Link to post
Share on other sites
Advertisement
row is an unsigned integer. If you try to assign a negative value to it, the value will wrap around and produce a number near 4 billion.

Share this post


Link to post
Share on other sites
http://www.acroname.com/brainstem/ref/h/TEA/types.html

You have a UINT which is just an unsigned int. So your going outside its bounds. You're likely going to want row to be a double. Just to clarify. a UINT cannot have a negative value, only a value of zero or up.

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!