[PD] match the closest number
danja
binary.koala at gmail.com
Mon Jun 18 19:09:41 CEST 2007
hello there,
i have a [list] of numbers and i'd like to search through it for the
value closest to the search subject. so to say, if i have '22 31 47 86'
in my list and i match it with '45' the answer would be '47' (closest in
the list). this rather useful function (fuzzy integer search?) must have
been written by someone already, it's just that i can't find it :)
i wouldn't ask if i could patch it myself, but i know how it might work:
all integers from the list are compared to the reference (subject)
number, and the integer in subtraction closest to '0' would be the
hit... you know what i mean?
any advice is very much appreciated!
p.s. apologies for my ignorance, i'm just starting here...
--
danja
http://k0a1a.net
More information about the Pd-list
mailing list