mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
corrected bug in nodes.cpp, line 129: bad modulo arithmetic.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3692 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
12428d766f
commit
4fb0b2145e
@ -126,7 +126,7 @@ void Node::calculateForces(const double *map,int width,int height,int W,int H,fl
|
||||
int X = std::min(W-1,std::max(0,(int)rint(x))) ;
|
||||
int Y = std::min(H-1,std::max(0,(int)rint(y))) ;
|
||||
|
||||
float val = map[2*((i+X)%W + W*((j+Y)%H))] ;
|
||||
float val = map[2*((i+X+W)%W + W*((j+Y+H)%H))] ;
|
||||
|
||||
dei += i * e[i+KS+(2*KS+1)*(j+KS)] * val ;
|
||||
dej += j * e[i+KS+(2*KS+1)*(j+KS)] * val ;
|
||||
|
Loading…
Reference in New Issue
Block a user