hash()
public
Returns a hash code for this float.
Show source
static VALUE
flo_hash(VALUE num)
{
double d;
st_index_t hash;
d = RFLOAT_VALUE(num);
/* normalize -0.0 to 0.0 */
if (d == 0.0) d = 0.0;
hash = rb_memhash(&d, sizeof(d));
return LONG2FIX(hash);
}