Index query in angle rotation
Разница между en3 и en4, 35 символ(ов) изменены
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 
`with length of n, `r = [0, theta, 2*theta, ..., (n-1)*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.↵

![ ](/predownloaded/91/e9/91e958e5fee7c5f541a1539cc0df6bbac6ec9d4b.png)↵

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en5 Английский TuanGe 2021-08-14 20:29:07 29 Tiny change: 'lue area)?\n\nReally' -> 'lue area)? There could be many queries.\n\nReally'
en4 Английский TuanGe 2021-08-14 08:27:24 35
en3 Английский TuanGe 2021-08-14 05:05:01 0 (published)
en2 Английский TuanGe 2021-08-14 05:04:45 354 Tiny change: 'e area)?\n![ ](/pr' -> 'e area)?\n\n![ ](/pr'
en1 Английский TuanGe 2021-08-14 04:57:39 318 Initial revision (saved to drafts)