You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constindex=binary.closest([25,33,50],32.99)expect(index).to.eq(1)// this throws and the index is 0. I would expect it to be 1// does the compare closest function work with decimals?
Activity
theCodeDrift commentedon Dec 7, 2021
closestreturns the leading edge. If you want the trailing edge, pass{end: true}to the function.