williamngan / pts

A library for visualization and creative-coding
https://ptsjs.org
Apache License 2.0
5.16k stars 182 forks source link

randomPt overwrites input value #203

Closed williamngan closed 10 months ago

williamngan commented 1 year ago

The inputs needs to be cloned before passing onto Vec.subtract: https://github.com/williamngan/pts/blob/master/src/Num.ts#L97