Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » C++ code help please. (Converting Variables)
Re: C++ code help please. [message #416863 is a reply to message #416861] Wed, 06 January 2010 10:06 Go to previous messageGo to previous message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma:
General (3 Stars)
Type-cast it, it will truncate the float but it should work fine.

float foo = 56.0f;

unsigned int i = (unsigned int)foo;
 
Read Message icon5.gif
Read Message
Read Message
Previous Topic: Questions (player objects, stealth vehs)
Next Topic: [preview] rotating weaponlist
Goto Forum:
  


Current Time: Sun Dec 15 03:54:41 MST 2024

Total time taken to generate the page: 0.00686 seconds