ignore that post.
what was i thinking, .. again? :))=20

kind regards -botp


# -----Original Message-----
# From: Pe=F1a, Botp [mailto:botp / delmonte-phil.com]=20
# Sent: Tuesday, October 30, 2007 11:19 AM
# To: ruby-talk ML
# Subject: Re: find the closest items in an array to a given value.
#=20
# From: trebor777 [mailto:mrobert / trebor777.net]=20
# # a =3D myhash.keys.sort[value-0.05..value+0.05]
# # then i just use=20
# # myhash[a[x]]
#=20
# can you test without hash?
#=20
# ~> a
# =3D> [1, 1.25, 1.9, 2, 3, 3.5]
# ~> val
# =3D> 1.85
# ~> a[val-0.5..val+0.5]
# =3D> [1.25, 1.9]
# ~> a.slice (val-0.5..val+0.5)
# =3D> [1.25, 1.9]
#=20
# kind regards -botp
#=20
#=20