about summary refs log tree commit diff stats
path: root/mandelbrot.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-05-09 08:36:37 -0700
committerKartik Agaram <vc@akkartik.com>2021-05-09 08:36:37 -0700
commit2e6065717d6297072ac23023583c218246ac7916 (patch)
tree664531020a22f24e083ded134c5f8655b486b777 /mandelbrot.mu
parent9ad9bf96bbb4502209d7c2e8b1e3c729bdfbcfc4 (diff)
downloadmu-2e6065717d6297072ac23023583c218246ac7916.tar.gz
.
Diffstat (limited to 'mandelbrot.mu')
-rw-r--r--mandelbrot.mu4
1 files changed, 4 insertions, 0 deletions
diff --git a/mandelbrot.mu b/mandelbrot.mu
index 3017ec20..84310a0d 100644
--- a/mandelbrot.mu
+++ b/mandelbrot.mu
@@ -107,6 +107,10 @@ fn mandelbrot-y x: float, y: float, imaginary: float -> _/xmm3: float {
   return result
 }
 
+# Scale (x, y) pixel coordinates to a complex plane where the viewport width
+# ranges from -2 to +2. Viewport height just follows the viewport's aspect
+# ratio.
+
 fn viewport-to-real x: int, width: int -> _/xmm0: float {
   # (x - width/2)*4/width
   var result/xmm0: float <- convert x