~()
public
One’s complement: returns a number where each bit is flipped.
Show source
/*
* call-seq:
* ~fix => integer
*
* One's complement: returns a number where each bit is flipped.
*/
static VALUE
fix_rev(num)
VALUE num;
{
long val = FIX2LONG(num);
val = ~val;
return LONG2NUM(val);
}