Not true ocean, i think you didnt understand the calculation.
But very interesting:
i put some DEBUGs in the code:
FUNCTION QQSIN: x
DEBUG "start x: "+x
IF x > 360
DEC x, INTEGER( x / 360 ) * 360
ELSEIF x < 0
INC x, INTEGER( 1 - x / 360 ) * 360
ENDIF
DEBUG " calculated x: "+x
IF x < 180
x = ( 0.02222144652331750907567718514381 - 0.00012346049003081125437778164739108 * x )* x
DEBUG " sin(x): "+(( 0.775 + 0.225 * x ) * x)+CHR$(10)
RETURN ( 0.775 + 0.225 *x ) * x
ENDIF
x = 180 - x
x = ( 0.02222144652331750907567718514381 + 0.00012346049003081125437778164739108 * x ) * x
DEBUG " sin(x): "+(( 0.775 - 0.225 * x ) * x)+CHR$(10)
RETURN ( 0.775 - 0.225 * x ) * x
ENDFUNCTION
if i do:
QQSIN(60.3)
QQSIN(60.3+360)
QQSIN(60.3-360)
QQSIN(60.3+720)
QQSIN(60.3-720)
i get on debugger:
start x: 60.3 calculated x: 60.3 sin(x): 0.8691949954
start x: 420.3 calculated x: 60.3 sin(x): 0.8691949954
start x: -299.7 calculated x: 60.3 sin(x): 0.8691949954
start x: 780.3 calculated x: 60.3 sin(x): 0.8691949954
start x: -659.7 calculated x: 60.3 sin(x): 0.8691949954
so basically no difference.
But by coding
DEBUG (QQSIN(60.3)-QQSIN(60.3+360))
i get:
-1.110223025e-016
so abruptly there s a very, very small difference... but i think its so small, i think it doesnt matter, 'cuz if you need high precision, you take the GLBasic SIN() and not one of the quicker functions.