Skip to content

Commit

Permalink
pre-compute twoPI
Browse files Browse the repository at this point in the history
Co-authored-by: Corentin Cadiou <[email protected]>
  • Loading branch information
chrishavlin and cphyc authored Oct 10, 2024
1 parent f06761f commit 5269837
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yt/utilities/lib/pixelization_routines.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,8 @@ def pixelize_cylinder(np.float64_t[:,:] buff,
ptbounds[1] = fmax(ptbounds[1], corners[i1])

# shift to a [0, PI] interval
ptbounds[0] = ptbounds[0] % (2*npPI)
ptbounds[1] = ptbounds[1] % (2*npPI)
ptbounds[0] = ptbounds[0] % twoPI
ptbounds[1] = ptbounds[1] % twoPI

if prbounds[0] >= rmin and prbounds[1] <= rmax and \
ptbounds[0] >= tmin and ptbounds[1] <= tmax:
Expand Down

0 comments on commit 5269837

Please sign in to comment.