//Title: Positive and Negative Numbers
//Credit to: Jtgibson
//Contributed by: Jtgibson
//This is just a pair of handy alias procs that allow you to turn
// a number into a congruent positive or negative number.
#define pos(X) (abs(X))
#define neg(X) (abs(X) * -1)
///*
//Testing code/sample implementation
mob/verb/test_abs(num as num)
usr << "<b>Number: [num]</b>"
usr << "--> Positive absolute value: [pos(num)]"
usr << "--> Negative absolute value: [neg(num)]"
//*/
ID:195157
Nov 21 2006, 6:35 am
|
|