Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Veteran Plugin.  () 1 Vote
Re: Veteran Plugin. [message #331770 is a reply to message #331766] Sat, 24 May 2008 08:36 Go to previous messageGo to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma:
General (5 Stars)
reborn wrote on Sat, 24 May 2008 15:44


Also, my maths seems to be fading away from me...
There must be a better way to turn a negative number into a positive number, rather then "(damage - damage) - damage)".


#include <cstdlib>
abs(number);

or, for floating point numbers

#include <cmath>
fabs(number);


Or, if you already know for sure the number is negative;
int number = -number;


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Sat, 24 May 2008 08:37]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: c++ simple commands
Next Topic: strings
Goto Forum:
  


Current Time: Tue Dec 24 23:09:06 MST 2024

Total time taken to generate the page: 0.01773 seconds