Meet a problem, but can't find solutions on internet. I know here are smartest people, so hope can get some help.
The problem is, starting from 0 degree, we rotate theta
every time, theta is a floating point, like 33.7 degree. So now we have an array of angle [0, theta, 2*theta, ...]
(wrap to [0..2*PI]).
And we are given an start index a
and end index b
, how can we quickly find all indices in [a..b]
whose angle fall into angel range [t1..t2]
(the blue area)?
Really thanks for any idea, I can only think out iterating all indices one by one.