Pavlos Posted May 5, 2006 Share Posted May 5, 2006 OK... so I have used FloatToInt() several times in my scripts but I was just wondering about the mechanics of it (I don't know whether "mechanics" is the correct term to use here but, meh!) Seeing as how a Float can be a decimalised number (An example being "GetFacing()") and an Integer has to be... an integer (Surprisingly) I want to know how this actually works out. Is the value rounded to the nearest whole number? Just thinking about this had me scratching my head, so I was wondering if someone who understands the internal workings of the game better than myself could explain it to me. Link to comment Share on other sites More sharing options...
Tupac Amaru Posted May 5, 2006 Share Posted May 5, 2006 The description is nwscript is misleading. The decimals are truncated. For example, 2.9 will be converted to 2, not 3. Link to comment Share on other sites More sharing options...
Pavlos Posted May 5, 2006 Author Share Posted May 5, 2006 Thanks, Tupac. YAY! Now I understand the game a little better. Lightning fast reply too . Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.