Skip to content

Commit

Permalink
Reset and rename pixelHightByWidthRatio to pixelAspectRatio
Browse files Browse the repository at this point in the history
  • Loading branch information
danyshaanan committed May 1, 2016
1 parent da34495 commit da241ca
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
Binary file modified doc/example1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/main/lib/calculateScreen.js
Expand Up @@ -7,6 +7,6 @@ const getColor = (x, y, iterations) => colorByIterations(iterationsToEscape(x, y

module.exports = (def, w, h) => {
const xs = Array.from(Array(w), (_, i) => def.x + (i - w / 2) / def.pixelsPerUnit)
const ys = Array.from(Array(h), (_, i) => def.y + (i - h / 2) / def.pixelsPerUnit * def.pixelHightByWidthRatio)
const ys = Array.from(Array(h), (_, i) => def.y + (i - h / 2) / def.pixelsPerUnit * def.pixelAspectRatio)
return ys.map(y => xs.map(x => getColor(x, y, def.iterations)).join('')).join('\n')
}
2 changes: 1 addition & 1 deletion src/main/lib/def.json
@@ -1,6 +1,6 @@
{
"pixelsPerUnit": 32,
"pixelHightByWidthRatio": 3,
"pixelAspectRatio": 2.4,
"x": -1.149719506110225,
"y": -0.312197910519423,
"iterations": 100
Expand Down
2 changes: 1 addition & 1 deletion src/test/lib/calculateScreen.spec.js
Expand Up @@ -5,7 +5,7 @@ import calculateScreen from '../../main/lib/calculateScreen.js'

const def = {
pixelsPerUnit: 32,
pixelHightByWidthRatio: 3,
pixelAspectRatio: 2.4,
x: -1.149719506110225,
y: -0.312197910519423,
iterations: 100
Expand Down
2 changes: 1 addition & 1 deletion src/test/lib/keyPress.spec.js
Expand Up @@ -6,7 +6,7 @@ import keyPress from '../../main/lib/keyPress.js'

const def = {
pixelsPerUnit: 10,
pixelHightByWidthRatio: 3,
pixelAspectRatio: 2.4,
x: 0,
y: 0,
iterations: 10
Expand Down

0 comments on commit da241ca

Please sign in to comment.