Skip to content

Commit

Permalink
fix: calculating width of x axis
Browse files Browse the repository at this point in the history
  • Loading branch information
istudyatuni committed Feb 9, 2022
1 parent 4db5608 commit 1018367
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wasm/mandelbrot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ EMSCRIPTEN_KEEPALIVE
#endif
void calcPlane(double lx, double rx, int width, int height, short* result) {
// total width of x axis (complex plane)
double xwidth = std::abs(lx) + std::abs(rx);
double xwidth = rx - lx;

// scale coefficient between complex plane and canvas
double scale = width / xwidth;
Expand Down

0 comments on commit 1018367

Please sign in to comment.