Sha256: 3f88450269b0fab6ec68293cd96909ae5eff4146e82ea02e421a528ffe5b0305

Contents?: true

Size: 344 Bytes

Versions: 34

Compression:

Stored size: 344 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

34 entries across 34 versions & 6 rubygems

Version Path
freespeech-1.0.88 ./documentation/abs
elonmusk-1.0.88 ./documentation/abs
politics-1.0.88 ./documentation/abs
democracy-1.0.86 ./documentation/abs
politics-1.0.82 ./documentation/abs
freespeech-1.0.82 ./documentation/abs
elonmusk-1.0.82 ./documentation/abs
ufos-1.0.82 ./documentation/abs
aliens-1.0.82 ./documentation/abs
politics-1.0.81 ./documentation/abs
ufos-1.0.79 ./documentation/abs
aliens-1.0.79 ./documentation/abs
freespeech-1.0.79 ./documentation/abs
elonmusk-1.0.79 ./documentation/abs