fix a reg allocation bug; add function angleVec(not fully tested);
Merge pull request #666 from tommo/particle-helper

fix a reg allocation bug; add function angleVec(not fully tested);