Skip to content

Commit

Permalink
Add nArray
Browse files Browse the repository at this point in the history
  • Loading branch information
Smilebags committed Jan 15, 2017
1 parent 051a060 commit e7d0186
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libraries/p5.dimensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ p5.prototype.nLimit = function(v1, n){
return output;
}

p5.prototype.nArray = function(v1){
var output = [];
for (var i = 0; i < Object.keys(v1).length; i++){
output[i] = v1[dimensionalSymbols[i]];
}
return output;
}

p5.prototype.nAdd = function(v1,v2) {
//implement add of nVectors
var output = new nVector();
Expand Down

1 comment on commit e7d0186

@Smilebags
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a comment referencing #8 to keep track of changes from there.

Please sign in to comment.