The Daily Click ::. Forums ::. Klik Coding Help ::. Making all values of a certain type positive...
 

Post Reply  Post Oekaki 
 

Posted By Message

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
5th December, 2003 at 21:14:43 -

I've been wondering, how do you make a value always positive. I've found that it's possible to do so with this formula:
Square root(Value*Value)

You know, with the Square root thing replaced by the proper code. But then, square roots are a little memory consuming, so I was wondering if there's an actual code to doing it.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Muggus

Possibly Insane

Registered
  31/07/2002
Points
  2958
5th December, 2003 at 21:19:30 -

The Absolute (or ABS) value function does exactly this. It should be there somewhere in MMF.

 
MUGGUS
Come and annoy me more at
www.muggus69.tk
STOUT ANGER!!!

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
5th December, 2003 at 22:15:13 -

Ah... thanks for the help.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image
   

Post Reply



 



Advertisement

Worth A Click