This commit is contained in:
Rikard Nordgren committed 2025-02-23 20:42:25 +01:00
1 parent 87380c3aa1
commit bda43d1b71
4 files changed
+11 -5

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
;
; Math package - cosine of FAC1 in radians
;
; Adds pi/2 to FAC1 and falls through to the sine function
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 210
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
;
COS:
ldy #>const_HALF_PI
lda #<const_HALF_PI
jsr add_MEM_FAC1
; FALLTHROUGH to SIN
+4
View File
@@ -0,0 +1,4 @@
This is an important floating point math routine, documented in many places.
Usage example:
- https://www.lemon64.com/forum/viewtopic.php?t=10492