Skip to content

Commit

Permalink
Fix: used PPTypes.VEC2i(1, 1) for data type consistency (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhinavcode13 authored Jun 10, 2024
1 parent 09e1657 commit 65d9dbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/polyphy/kernel/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def world_to_grid_2D(
pos_relative = (pos_world - domain_min) / (domain_max - domain_min)
grid_coord = ti.cast(pos_relative * ti.cast(
grid_resolution, PPTypes.FLOAT_GPU), PPTypes.INT_GPU)
return ti.max(PPTypes.VEC2i(0, 0), ti.min(grid_coord, grid_resolution - (1, 1)))
return ti.max(PPTypes.VEC2i(0, 0), ti.min(grid_coord, grid_resolution - PPTypes.VEC2i(1, 1)))

@ti.func
def ray_AABB_intersection(self, ray_pos, ray_dir, AABB_min, AABB_max):
Expand Down

0 comments on commit 65d9dbe

Please sign in to comment.