Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualSatharis

Posted 26 December 2012 - 02:36 PM

I really don't understand why you're casting floats to ints for a function that takes floats. If you want to change them to whole numbers you should just cast them seperately to remove the ambiguity or use some kind of round function instead of shearing the last bits off by casting. Rounding would actually be better if you're trying to move them closer to a logical position.

 

Often warnings are there for a reason and I'm not sure why people are so apt to disable them when the extra code to disable them could just as easily -fix- the warning.


#2Satharis

Posted 26 December 2012 - 02:36 PM

I really don't understand why you're casting floats to ints for a function that takes floats. If you want to change them to whole numbers you should just cast them seperately to remove the ambiguity or use some kind of round function instead of shearing the last bits off by casting.

 

Often warnings are there for a reason and I'm not sure why people are so apt to disable them when the extra code to disable them could just as easily -fix- the warning.


#1Satharis

Posted 26 December 2012 - 02:35 PM

I really don't understand why you're casting floats to ints for a function that takes floats. If you want to clamp them thme to whole numbers you should just cast them seperately to remove the ambiguity or use some kind of clamp function instead of shearing the last bits off by casting.

 

Often warnings are there for a reason and I'm not sure why people are so apt to disable them when the extra code to disable them could just as easily -fix- the warning.


PARTNERS