angleNorm returns the angle theta in the range [0,2PI).
(theta float64)
| 67 | |
| 68 | // angleNorm returns the angle theta in the range [0,2PI). |
| 69 | func angleNorm(theta float64) float64 { |
| 70 | theta = math.Mod(theta, 2.0*math.Pi) |
| 71 | if theta < 0.0 { |
| 72 | theta += 2.0 * math.Pi |
| 73 | } |
| 74 | return theta |
| 75 | } |
| 76 | |
| 77 | // angleTime returns the time [0.0,1.0] of theta between [lower,upper]. When outside of [lower,upper], the result will also be outside of [0.0,1.0]. |
| 78 | func angleTime(theta, lower, upper float64) float64 { |
no outgoing calls