abs function

new topic     » goto parent     » topic index » view thread      » older message » newer message

Okay, one last shot at this:

function abs(object x)
return ((x>=0)*2-1)*x
end function

This is how I would have done it in C, well, more or less anyways.
Laters,

___
_|ohn

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu