Sha256: dab511027f550d26492dc08347a6e866ef91c2daf97af64b5b624ef71b84a2b4

Contents?: true

Size: 357 Bytes

Versions: 16

Compression:

Stored size: 357 Bytes

Contents

Abs gets the absolute value of an integer

The absolute value of a number is the value of that number without its sign


echo -300 | abs

=>  300


echo 200 | abs


=> 200 


(echo -2; echo -10) | sub | abs




=>  12


The last one would do -2 - -10,  the result would be -12, and then the absolute value would be computed, and  so the result would be 12.

Version data entries

16 entries across 15 versions & 4 rubygems

Version Path
elonmusk-1.0.77 ./documentation/abs
ufos-1.0.77 ./documentation/abs
aliens-1.0.77 ./documentation/abs
freespeech-1.0.77 ./documentation/abs
elonmusk-1.0.72 ./documentation/abs
ufos-1.0.72 ./documentation/abs
aliens-1.0.72 ./documentation/abs
freespeech-1.0.72 ./documentation/abs
freespeech-1.0.71 ./documentation/abs
elonmusk-1.0.71 ./documentation/abs
ufos-1.0.71 ./documentation/abs
aliens-1.0.71 ./documentation/abs
elonmusk-1.0.56 ./de/documentation/abs
elonmusk-1.0.56 ./documentation/abs
elonmusk-1.0.53 ./documentation/abs
elonmusk-1.0.43 ./documentation/abs