From eb81b7de4b331dc32684e90ee9898520c80c14e4 Mon Sep 17 00:00:00 2001 From: Tanish <64203208+tanish14@users.noreply.github.com> Date: Wed, 10 Feb 2021 20:49:36 +0530 Subject: [PATCH] standardised util functions comments (#1805) * standardised util functions comments * Update pixelSetter.js * Update pixelSetter.js * Update pixelSetter.js Co-authored-by: Harsh Khandeparkar <34770591+HarshKhandeparkar@users.noreply.github.com> --- src/util/getDefaults.js | 1 + src/util/pixelSetter.js | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/util/getDefaults.js b/src/util/getDefaults.js index 308f73c1..c4ec82cb 100644 --- a/src/util/getDefaults.js +++ b/src/util/getDefaults.js @@ -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) { diff --git a/src/util/pixelSetter.js b/src/util/pixelSetter.js index ab098575..e8b60f95 100644 --- a/src/util/pixelSetter.js +++ b/src/util/pixelSetter.js @@ -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]); } -}; \ No newline at end of file +};