public OObject function( OObject x ){
if( x instanceof Complex ){
Complex c = (Complex)x;
if( scale != 1 && StrictMath.abs( c.imaginary() ) > 1e-6 )
throw new RuntimeException( "Error" );
return c.scale( scale ).cos();
} else {
return x.cos( angleType );
}
}