mirror of
https://github.com/irmen/prog8.git
synced 2024-12-27 05:29:38 +00:00
truly fix min(f)/max(f) also fix ceil(f)
This commit is contained in:
parent
742b15357b
commit
fb2796ac06
@ -831,7 +831,7 @@ func_ceil .proc
|
|||||||
; -- ceil: tr = int(f); if tr==f -> return else return tr+1
|
; -- ceil: tr = int(f); if tr==f -> return else return tr+1
|
||||||
jsr pop_float_fac1
|
jsr pop_float_fac1
|
||||||
stx c64.SCRATCH_ZPREGX
|
stx c64.SCRATCH_ZPREGX
|
||||||
lda #<fmath_float1
|
ldx #<fmath_float1
|
||||||
ldy #>fmath_float1
|
ldy #>fmath_float1
|
||||||
jsr MOVMF
|
jsr MOVMF
|
||||||
jsr INT
|
jsr INT
|
||||||
@ -915,9 +915,9 @@ _minmax_cmp cmp #255 ; modified
|
|||||||
inc c64.SCRATCH_ZPWORD1+1
|
inc c64.SCRATCH_ZPWORD1+1
|
||||||
+ ldy c64.SCRATCH_ZPREG
|
+ ldy c64.SCRATCH_ZPREG
|
||||||
dey
|
dey
|
||||||
|
cpy #255
|
||||||
bne -
|
bne -
|
||||||
jmp push_fac1_as_result
|
jmp push_fac1_as_result
|
||||||
rts
|
|
||||||
_largest_neg_float .byte 255,255,255,255,255 ; largest negative float -1.7014118345e+38
|
_largest_neg_float .byte 255,255,255,255,255 ; largest negative float -1.7014118345e+38
|
||||||
.pend
|
.pend
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user