Skip to content

Commit

Permalink
standardised util functions comments (#1805)
Browse files Browse the repository at this point in the history
* standardised util functions comments

* Update pixelSetter.js

* Update pixelSetter.js

* Update pixelSetter.js

Co-authored-by: Harsh Khandeparkar <[email protected]>
  • Loading branch information
tanish14 and harshkhandeparkar authored Feb 10, 2021
1 parent a73cba8 commit eb81b7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/util/getDefaults.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** Parses the defaults and gets the input which is available. */
module.exports = function(info){
var defaults = {};
for (var key in info.inputs) {
Expand Down
9 changes: 8 additions & 1 deletion src/util/pixelSetter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
/**
* @param {number} x x-coordinate.
* @param {number} y y-coordinate.
* @param {object} value array [r, g, b, a]
* @param {object} pixels NDarray of pixels.
* @description Sets the pixels from 0 through length of value.
*/
module.exports = function(x, y, value, pixels){
for(let i = 0; i < value.length; i++){
pixels.set(x, y, i, value[i]);
}
};
};

0 comments on commit eb81b7d

Please sign in to comment.