fixes slow version of setNextPositionPerlin()