~~~
} else {
  x.data(i) -= step * dir.data(i)
}
~~~