states.bzz syntax fix

This commit is contained in:
vivek-shankar 2018-07-05 02:46:51 -04:00
parent 3bab2e5f7b
commit ecb2aa67fe
1 changed files with 2 additions and 1 deletions

View File

@ -143,7 +143,8 @@ function pursuit() {
if(neighbors.count() > 0)
r_vec = math.vec2.scale(r_vec, 1.0 / neighbors.count())
r = math.vec2.length(r_vec)
gamma = vd / math.sqrt((r-rd)*(r-rd)+pc*pc*r*r)
var sqr = (r-rd)*(r-rd)+pc*pc*r*r
gamma = vd / math.sqrt(sqr)
dr = -gamma * (r-rd)
dT = gamma * pc
vfg = math.vec2.newp(r+dr*0.1, math.vec2.angle(r_vec)+dT*0.1)