I've recently saw this code in a discord server:
const image = Image.new(1024, 1024)
const a = 32
let g = (b, c) => b+a * c+a // what's the math behind this? b and c is undefined.
image.fill(g)
(image is an image manipulation module)
My question is, how the variable g
works when it generates the image? Image.fill() goes through the each pixel of the image and set a color, but I don't understand the math behind let g = (b, c) => b+a * c+a