absolute_value.c

ds2.1.1/lib/secure/sefun/absolute_value.c · 268 B

From the archive ds2.1.1.zip

Download the archive   « Back to the archive contents

//      /adm/simul_efun/absolute_value.c
//      from the Dead Souls mudlib
//      an absolute value simul_efun
//      created by Descartes 28 april 1993

int absolute_value(int x) {
    return ( (x>-1) ? x : -x);
}

int abs(int x) {
    return absolute_value(x);
}

Site Stats

Snippets: 1791
Codebases: 571