RETURN_REAL |
RETURN_REAL( real-value )
Returns a REAl value
Example
///////////////////////////////////////////////////////////////////////////// // real = SAMPLE.ATAN( p1 ) // real = SAMPLE.ATAN( p1, p2 ) // int _Sample_atan( mb_interpreter_t* s, void** l ) { float fAtan = 0;
BEGIN_PARSE( s, l ) POP_REAL( p1 ) OPT_REAL( p2, 0 ) END_PARSE
if ( SKIPPED_LAST ) { // Use atan( x )
fAtan = float( atan( p1 ) ); } else { // Use atan( y, x )
fAtan = float( atan2( p1, p2 ) ); }
RETURN_REAL( fAtan ); }
|