Skip to content

Commit

Permalink
Fix division issue
Browse files Browse the repository at this point in the history
  • Loading branch information
godwhoa committed Oct 26, 2018
1 parent 2090fe5 commit 13cb9f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyspades/mapmaker.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ cdef class HeightMap:
down = swap[((x)%self.width)+((y+1)%self.height)*self.width]
mid = swap[((x)%self.width)+((y)%self.height)*self.width]

r = (get_r(left) + get_r(right) + get_r(up) + get_r(down) + get_r(mid))/5
g = (get_g(left) + get_g(right) + get_g(up) + get_g(down) + get_g(mid))/5
b = (get_b(left) + get_b(right) + get_b(up) + get_b(down) + get_b(mid))/5
r = (get_r(left) + get_r(right) + get_r(up) + get_r(down) + get_r(mid))//5
g = (get_g(left) + get_g(right) + get_g(up) + get_g(down) + get_g(mid))//5
b = (get_b(left) + get_b(right) + get_b(up) + get_b(down) + get_b(mid))//5

self.set_col_repeat(x,y,make_color(r,g,b))

Expand Down

0 comments on commit 13cb9f4

Please sign in to comment.