so I have a $t$ value between $[0,1]$, two angles $\theta1$ and $\theta2$ between $[-\pi, \pi]$
What I want is the $\theta$ value between $\theta1$ and $\theta2$ in the small arc that's why I can't use $\theta = \theta1 * t + \theta2 * (1-t)$
so I have a $t$ value between $[0,1]$, two angles $\theta1$ and $\theta2$ between $[-\pi, \pi]$
What I want is the $\theta$ value between $\theta1$ and $\theta2$ in the small arc that's why I can't use $\theta = \theta1 * t + \theta2 * (1-t)$
Here's a solution: First, let's assume $\theta_1 \le \theta_2$.
Case 1. If $\theta_2 - \theta_1 \le \pi$, use the formula you've got (slightly modified) to $$ \theta = (1-t)\theta_1 + t \theta_2. $$ which will give $\theta_1$ for $t = 0$ and $\theta_2$ for $t = 1$.
Case 2: Otherwise, let $\phi_i =( \theta_i + \pi) \bmod 2\pi$, let $$ \phi = (1-t)\phi_1 + t \phi_2 $$ and let $$ \theta = (\phi - \pi) \bmod 2\phi. $$
Here "$x \bmod 2\pi$ means the number $0 \le y < 2\pi$ such that $y - x$ is an integer multiple of $2\pi$. To put it differently, if $x < 0$, add enough copies of $2\pi$ to $x$ to make it nonnegative; if $x \ge 2\pi$, subtract as many copies of $2\pi$ from $x$ as you can without making it negative.