diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-02-03 21:11:55 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-02-03 21:11:55 -0500 |
commit | 73ea7c6326f16f84de1cf74193705328d1664645 (patch) | |
tree | 31c6e407dd73df136f34c7945c8198afb2746f0a /home/sine.asm | |
parent | 271aa20b73f699819351e787c58d0d14694eb135 (diff) |
Macro factors out sine code, just like sine data, since it's used 5 times
Diffstat (limited to 'home/sine.asm')
-rw-r--r-- | home/sine.asm | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/home/sine.asm b/home/sine.asm index eff5ed299..a32a31612 100644 --- a/home/sine.asm +++ b/home/sine.asm @@ -1,13 +1,10 @@ Cosine:: ; 1b0f -; Return d * cos(a) in hl - add %010000 ; 90 degrees - +; a = d * cos(a * pi/32) + add %010000 ; cos(x) = sin(x + pi/2) + ; fallthrough Sine:: ; 1b11 -; Return d * sin(a) in hl -; a is a signed 6-bit value. - +; a = d * sin(a * pi/32) ld e, a - homecall _Sine ret ; 1b1e |