Sign in to follow this  
MTclip

how can this return that value?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this