Skip to content

Commit

Permalink
Fix #203
Browse files Browse the repository at this point in the history
  • Loading branch information
williamngan committed Oct 28, 2023
1 parent 49afb6d commit 0c7e96c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Num.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class Num {
*/
static randomPt( a:PtLike, b?:PtLike ):Pt {
let p = new Pt( a.length );
let range = b ? Vec.subtract(b, a) : a;
let range = b ? Vec.subtract(b.slice(), a) : a;
let start = b ? a : new Pt(a.length).fill(0);
for (let i=0, len=p.length; i<len; i++) {
p[i] = Num.random() * range[i] + start[i];
Expand Down

0 comments on commit 0c7e96c

Please sign in to comment.