fix trig bug
This commit is contained in:
parent
2fe1d7d770
commit
3993dbc80a
|
@ -343,12 +343,9 @@
|
|||
POP2r POP2r NIP2 JMP2r ( s1* )
|
||||
|
||||
@x16-cos ( x* -> cos[x]* )
|
||||
x16-pi/2 ,&x16-sin-cos-helper/offset STR2 !sin-cos-helper
|
||||
x16-pi/2 ADD2
|
||||
|
||||
@x16-sin ( x* -> sin[x]* )
|
||||
#0000 ,&x16-sin-cos-helper/offset STR2 ( fall-through )
|
||||
|
||||
@x16-sin-cos-helper
|
||||
DUP2 #8000 LTH2 ?&non-negative
|
||||
x16-negate x16-sin/non-negative !x16-negate
|
||||
&non-negative
|
||||
|
@ -356,7 +353,6 @@
|
|||
DUP2 STH2kr x16-quotient ( x x/2pi [2pi] )
|
||||
DUP2 #1400 DIV2 STH2 SWP2r ( x x/2pi [adj* 2pi*] )
|
||||
STH2r x16-mul STH2r ADD2 SUB2 ( x' ; 0 <= x' < 2pi )
|
||||
LIT2 [ &offset $2 ] ADD2
|
||||
DUP2 x16-3pi/2 LTH2 ?&c1
|
||||
( -sin(2pi - x) ) x16-pi*2 SWP2 SUB2 x16-sin-q !x16-negate
|
||||
&c1 DUP2 x16-pi LTH2 ?&c2
|
||||
|
|
Loading…
Reference in New Issue