Method: FloatString#outer_append

Defined in:
lib/carat/floatstring.rb

#outer_append(s, i) ⇒ Object



79
80
81
82
83
84
85
86
# File 'lib/carat/floatstring.rb', line 79

def outer_append(s, i)
  n = 0.5; i = i.to_f + 0.5
  while @float.has_key?(i)
    n = n/2
    i += n
  end
  @float[i] = s
end